ignore the hInstance field while searching classes if it's NULL

svn path=/trunk/; revision=9482
This commit is contained in:
Thomas Bluemel 2004-05-23 14:04:58 +00:00
parent 924e3b2bea
commit 5096908ac7
2 changed files with 3 additions and 9 deletions

View file

@ -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);

View file

@ -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);