diff --git a/reactos/lib/user32/windows/window.c b/reactos/lib/user32/windows/window.c index 49e7404a164..921e8885971 100644 --- a/reactos/lib/user32/windows/window.c +++ b/reactos/lib/user32/windows/window.c @@ -1,4 +1,4 @@ -/* $Id: window.c,v 1.118 2004/05/21 10:09:31 weiden Exp $ +/* $Id: window.c,v 1.119 2004/05/23 14:04:58 weiden Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS user32.dll @@ -193,9 +193,6 @@ CreateWindowExA(DWORD dwExStyle, ControlsInitialized = ControlsInit(ClassName.Buffer); } - if ( hInstance == NULL ) - hInstance = GetModuleHandleW(NULL); - if (dwExStyle & WS_EX_MDICHILD) { if (!IS_ATOM(lpClassName)) @@ -281,9 +278,6 @@ CreateWindowExW(DWORD dwExStyle, ControlsInitialized = ControlsInit(lpClassName); } - if ( hInstance == NULL ) - hInstance = GetModuleHandleW(NULL); - if (dwExStyle & WS_EX_MDICHILD) return CreateMDIWindowW(lpClassName, lpWindowName, dwStyle, x, y, nWidth, nHeight, hWndParent, hInstance, (LPARAM)lpParam); diff --git a/reactos/subsys/win32k/ntuser/class.c b/reactos/subsys/win32k/ntuser/class.c index 654d364ec40..4cab09725ff 100644 --- a/reactos/subsys/win32k/ntuser/class.c +++ b/reactos/subsys/win32k/ntuser/class.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: class.c,v 1.55 2004/05/17 16:38:58 navaraf Exp $ +/* $Id: class.c,v 1.56 2004/05/23 14:04:58 weiden Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -63,7 +63,7 @@ ClassReferenceClassByAtom( { Current = CONTAINING_RECORD(CurrentEntry, WNDCLASS_OBJECT, ListEntry); - if (Current->Atom == Atom && Current->hInstance == hInstance) + if (Current->Atom == Atom && (hInstance == NULL || Current->hInstance == hInstance)) { *Class = Current; ObmReferenceObject(Current);