Alexandre Julliard : user32: Move loading of the 16-bit window menu to CreateWindowEx16.
Alexandre Julliard
julliard at winehq.org
Thu Dec 17 10:37:15 CST 2009
Module: wine
Branch: master
Commit: bfcfe437e2eebce2126b3cfb511cd880cc9529ac
URL: http://source.winehq.org/git/wine.git/?a=commit;h=bfcfe437e2eebce2126b3cfb511cd880cc9529ac
Author: Alexandre Julliard <julliard at winehq.org>
Date: Thu Dec 17 14:48:06 2009 +0100
user32: Move loading of the 16-bit window menu to CreateWindowEx16.
---
dlls/user32/win.c | 17 +++++++++++------
1 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/dlls/user32/win.c b/dlls/user32/win.c
index 51cc743..18c2332 100644
--- a/dlls/user32/win.c
+++ b/dlls/user32/win.c
@@ -1282,14 +1282,10 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, LPCWSTR className, HINSTANCE
}
else
{
- LPCSTR menuName = (LPCSTR)GetClassLongPtrA( hwnd, GCLP_MENUNAME );
+ LPCWSTR menuName = (LPCWSTR)GetClassLongPtrW( hwnd, GCLP_MENUNAME );
if (menuName)
{
- if (!cs->hInstance || HIWORD(cs->hInstance))
- cs->hMenu = LoadMenuA(cs->hInstance,menuName);
- else
- cs->hMenu = HMENU_32(LoadMenu16(HINSTANCE_16(cs->hInstance),menuName));
-
+ cs->hMenu = LoadMenuW( cs->hInstance, menuName );
if (cs->hMenu) MENU_SetMenu( hwnd, cs->hMenu );
}
}
@@ -1489,6 +1485,15 @@ HWND16 WINAPI CreateWindowEx16( DWORD exStyle, LPCSTR className,
/* map to module handle */
if (instance) instance = GetExePtr( instance );
+ /* load the menu */
+ if (!menu && (style & (WS_CHILD | WS_POPUP)) != WS_CHILD)
+ {
+ WNDCLASSA class;
+
+ if (GetClassInfoA( HINSTANCE_32(instance), className, &class ))
+ cs.hMenu = HMENU_32( LoadMenu16( instance, class.lpszMenuName ));
+ }
+
if (!IS_INTRESOURCE(className))
{
WCHAR bufferW[256];
More information about the wine-cvs
mailing list