mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 17:44:45 +00:00
get current HINSTANCE if given NULL in CreateWindowExA&W - fixes bug I found today with my little 'window stresser' app.
svn path=/trunk/; revision=9444
This commit is contained in:
parent
46d6fe4163
commit
a7cf6b254f
1 changed files with 7 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $Id: window.c,v 1.116 2004/05/08 12:42:45 weiden Exp $
|
||||
/* $Id: window.c,v 1.117 2004/05/20 04:10:01 royce Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS user32.dll
|
||||
|
@ -193,6 +193,9 @@ CreateWindowExA(DWORD dwExStyle,
|
|||
ControlsInitialized = ControlsInit(ClassName.Buffer);
|
||||
}
|
||||
|
||||
if ( hInstance == NULL )
|
||||
hInstance = GetModuleHandleW(NULL);
|
||||
|
||||
if (dwExStyle & WS_EX_MDICHILD)
|
||||
{
|
||||
if (!IS_ATOM(lpClassName))
|
||||
|
@ -278,6 +281,9 @@ 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);
|
||||
|
|
Loading…
Reference in a new issue