From 166f97fa190c5f9fa48f2a62d20a43338263ebbe Mon Sep 17 00:00:00 2001 From: Matthias Kupfer Date: Sat, 21 Feb 2009 22:35:11 +0000 Subject: [PATCH] - implements an initial DrawMenuBar function (fixes the taskbar menu redraw bug) - sorry, may contain a potentially hackfix (SendMessage WM_NCPAINT) svn path=/trunk/; revision=39703 --- reactos/dll/win32/user32/windows/menu.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/reactos/dll/win32/user32/windows/menu.c b/reactos/dll/win32/user32/windows/menu.c index 3b94b4d999d..d8c0822c426 100644 --- a/reactos/dll/win32/user32/windows/menu.c +++ b/reactos/dll/win32/user32/windows/menu.c @@ -4033,7 +4033,21 @@ CreatePopupMenu(VOID) BOOL WINAPI DrawMenuBar(HWND hWnd) { - return (BOOL)NtUserCallHwndLock(hWnd, HWNDLOCK_ROUTINE_DRAWMENUBAR); + ROSMENUINFO MenuInfo; + HMENU hMenu; + hMenu = GetMenu(hWnd); + if (!hMenu) + return FALSE; + MenuGetRosMenuInfo(&MenuInfo, hMenu); + MenuInfo.Height = 0; // make sure to recalc size + MenuSetRosMenuInfo(&MenuInfo); + /* The wine method doesn't work and I suspect it's more effort + then hackfix solution + SetWindowPos( hWnd, 0, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | + SWP_NOZORDER | SWP_FRAMECHANGED ); + return TRUE;*/ + // FIXME: hackfix + return SendMessage(hWnd,WM_NCPAINT,(WPARAM)1,(LPARAM)0L); }