Implement DrawMenuBar.
Modified: trunk/reactos/lib/user32/windows/menu.c
Modified: trunk/reactos/subsys/win32k/ntuser/misc.c
_____
Modified: trunk/reactos/lib/user32/windows/menu.c
--- trunk/reactos/lib/user32/windows/menu.c 2005-07-08 19:55:30 UTC
(rev 16513)
+++ trunk/reactos/lib/user32/windows/menu.c 2005-07-09 04:11:36 UTC
(rev 16514)
@@ -3534,14 +3534,12 @@
/*
- * @unimplemented
+ * @implemented
*/
BOOL STDCALL
DrawMenuBar(HWND hWnd)
{
- UNIMPLEMENTED
- /* FIXME - return NtUserCallHwndLock(hWnd, 0x55); */
- return FALSE;
+ return (BOOL)NtUserCallHwndLock(hWnd, HWNDLOCK_ROUTINE_DRAWMENUBAR);
}
_____
Modified: trunk/reactos/subsys/win32k/ntuser/misc.c
--- trunk/reactos/subsys/win32k/ntuser/misc.c 2005-07-08 19:55:30 UTC
(rev 16513)
+++ trunk/reactos/subsys/win32k/ntuser/misc.c 2005-07-09 04:11:36 UTC
(rev 16514)
@@ -651,8 +651,21 @@
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 */