Use the module handle, if CreateWindowEx is called with

hInstance==NULL.
This commit is contained in:
Rein Klazes 1999-10-23 13:57:36 +00:00 committed by Alexandre Julliard
parent 7064c0879f
commit d4a2ceede0
1 changed files with 6 additions and 0 deletions

View File

@ -1091,6 +1091,9 @@ HWND WINAPI CreateWindowExA( DWORD exStyle, LPCSTR className,
ATOM classAtom;
CREATESTRUCTA cs;
if(!instance)
instance=GetModuleHandleA(NULL);
if(exStyle & WS_EX_MDICHILD)
return MDI_CreateMDIWindowA(className, windowName, style, x, y, width, height, parent, instance, (LPARAM)data);
/* Find the class atom */
@ -1133,6 +1136,9 @@ HWND WINAPI CreateWindowExW( DWORD exStyle, LPCWSTR className,
ATOM classAtom;
CREATESTRUCTW cs;
if(!instance)
instance=GetModuleHandleA(NULL);
if(exStyle & WS_EX_MDICHILD)
return MDI_CreateMDIWindowW(className, windowName, style, x, y, width, height, parent, instance, (LPARAM)data);