GetMenu might be used to get child window id.

This commit is contained in:
Dmitry Timoshkov 2000-09-09 19:38:34 +00:00 committed by Alexandre Julliard
parent f708f548b9
commit fbb2c9bdf8

View file

@ -4036,16 +4036,15 @@ HMENU16 WINAPI GetMenu16( HWND16 hWnd )
* GetMenu (USER32.257) * GetMenu (USER32.257)
*/ */
HMENU WINAPI GetMenu( HWND hWnd ) HMENU WINAPI GetMenu( HWND hWnd )
{ {
HMENU retvalue; HMENU retvalue;
WND * wndPtr = WIN_FindWndPtr(hWnd); WND * wndPtr = WIN_FindWndPtr(hWnd);
if (wndPtr && !(wndPtr->dwStyle & WS_CHILD))
{ if (!wndPtr) return 0;
retvalue = (HMENU)wndPtr->wIDmenu;
goto END; retvalue = (HMENU)wndPtr->wIDmenu;
} TRACE("for %swindow %04x returning %04x\n",
retvalue = 0; (wndPtr->dwStyle & WS_CHILD) ? "child " : "", hWnd, retvalue);
END:
WIN_ReleaseWndPtr(wndPtr); WIN_ReleaseWndPtr(wndPtr);
return retvalue; return retvalue;
} }