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)
*/
HMENU WINAPI GetMenu( HWND hWnd )
{
{
HMENU retvalue;
WND * wndPtr = WIN_FindWndPtr(hWnd);
if (wndPtr && !(wndPtr->dwStyle & WS_CHILD))
{
retvalue = (HMENU)wndPtr->wIDmenu;
goto END;
}
retvalue = 0;
END:
if (!wndPtr) return 0;
retvalue = (HMENU)wndPtr->wIDmenu;
TRACE("for %swindow %04x returning %04x\n",
(wndPtr->dwStyle & WS_CHILD) ? "child " : "", hWnd, retvalue);
WIN_ReleaseWndPtr(wndPtr);
return retvalue;
}