diff --git a/reactos/lib/user32/windows/menu.c b/reactos/lib/user32/windows/menu.c index a28099066a1..97361d26eb1 100644 --- a/reactos/lib/user32/windows/menu.c +++ b/reactos/lib/user32/windows/menu.c @@ -3534,14 +3534,12 @@ DestroyMenu(HMENU hMenu) /* - * @unimplemented + * @implemented */ BOOL STDCALL DrawMenuBar(HWND hWnd) { - UNIMPLEMENTED - /* FIXME - return NtUserCallHwndLock(hWnd, 0x55); */ - return FALSE; + return (BOOL)NtUserCallHwndLock(hWnd, HWNDLOCK_ROUTINE_DRAWMENUBAR); } diff --git a/reactos/subsys/win32k/ntuser/misc.c b/reactos/subsys/win32k/ntuser/misc.c index 7f20540227d..81fb50933ce 100644 --- a/reactos/subsys/win32k/ntuser/misc.c +++ b/reactos/subsys/win32k/ntuser/misc.c @@ -651,8 +651,21 @@ NtUserCallHwndLock( break; case HWNDLOCK_ROUTINE_DRAWMENUBAR: - /* FIXME */ - break; + { + PMENU_OBJECT MenuObject; + DPRINT1("HWNDLOCK_ROUTINE_DRAWMENUBAR\n"); + Ret = FALSE; + if (!((Window->Style & (WS_CHILD | WS_POPUP)) != WS_CHILD)) break; + MenuObject = IntGetMenuObject((HMENU) Window->IDMenu); + if(MenuObject == NULL) break; + MenuObject->MenuInfo.WndOwner = hWnd; + MenuObject->MenuInfo.Height = 0; + IntReleaseMenuObject(MenuObject); + WinPosSetWindowPos(hWnd, 0, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | + SWP_NOACTIVATE | SWP_NOZORDER | SWP_FRAMECHANGED ); + Ret = TRUE; + break; + } case HWNDLOCK_ROUTINE_REDRAWFRAME: /* FIXME */