Commit b94f63ef authored by Rein Klazes's avatar Rein Klazes Committed by Alexandre Julliard

user32: Handle MN_GETHMENU in PopupMenuWndProc.

parent 7f8e4e27
...@@ -3509,6 +3509,7 @@ static LRESULT WINAPI PopupMenuWndProc( HWND hwnd, UINT message, WPARAM wParam, ...@@ -3509,6 +3509,7 @@ static LRESULT WINAPI PopupMenuWndProc( HWND hwnd, UINT message, WPARAM wParam,
break; break;
case MM_GETMENUHANDLE: case MM_GETMENUHANDLE:
case MN_GETHMENU:
return GetWindowLongPtrW( hwnd, 0 ); return GetWindowLongPtrW( hwnd, 0 );
default: default:
......
...@@ -150,10 +150,12 @@ static int gflag_initmenupopup, ...@@ -150,10 +150,12 @@ static int gflag_initmenupopup,
static LRESULT WINAPI menu_ownerdraw_wnd_proc(HWND hwnd, UINT msg, static LRESULT WINAPI menu_ownerdraw_wnd_proc(HWND hwnd, UINT msg,
WPARAM wparam, LPARAM lparam) WPARAM wparam, LPARAM lparam)
{ {
static HMENU hmenupopup;
switch (msg) switch (msg)
{ {
case WM_INITMENUPOPUP: case WM_INITMENUPOPUP:
gflag_initmenupopup++; gflag_initmenupopup++;
hmenupopup = (HMENU) wparam;
break; break;
case WM_ENTERMENULOOP: case WM_ENTERMENULOOP:
gflag_entermenuloop++; gflag_entermenuloop++;
...@@ -229,6 +231,11 @@ static LRESULT WINAPI menu_ownerdraw_wnd_proc(HWND hwnd, UINT msg, ...@@ -229,6 +231,11 @@ static LRESULT WINAPI menu_ownerdraw_wnd_proc(HWND hwnd, UINT msg,
{ {
ok( lparam || broken(!lparam), /* win9x, nt4 */ ok( lparam || broken(!lparam), /* win9x, nt4 */
"Menu window handle is NULL!\n"); "Menu window handle is NULL!\n");
if( lparam) {
HMENU hmenu = (HMENU)SendMessageA( (HWND)lparam, MN_GETHMENU, 0, 0);
ok( hmenupopup == hmenu, "MN_GETHMENU returns %p expected %p\n",
hmenu, hmenupopup);
}
PostMessage(hwnd, WM_CANCELMODE, 0, 0); PostMessage(hwnd, WM_CANCELMODE, 0, 0);
return TRUE; return TRUE;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment