Commit cf2ff27f authored by Gerard Patel's avatar Gerard Patel Committed by Alexandre Julliard

Recalculate menu sizes if WM_INITMENU has recreated/changed something.

parent db47fd09
......@@ -3016,8 +3016,20 @@ static BOOL MENU_InitTracking(HWND hWnd, HMENU hMenu, BOOL bPopup, UINT wFlags)
SendMessageA( hWnd, WM_SETCURSOR, hWnd, HTCAPTION );
if (!(wFlags & TPM_NONOTIFY))
{
POPUPMENU *menu;
SendMessageA( hWnd, WM_INITMENU, hMenu, 0 );
if ((menu = MENU_GetMenu( hMenu )) && (!menu->Height))
{ /* app changed/recreated menu bar entries in WM_INITMENU
Recalculate menu sizes else clicks will not work */
RECT r;
HDC hdc = GetDCEx( hWnd, 0, DCX_CACHE | DCX_WINDOW );
SelectObject( hdc, hMenuFont);
GetClientRect(hWnd, &r); /* probably too simple */
MENU_MenuBarCalcSize( hdc, &r, menu, hWnd );
ReleaseDC(hWnd, hdc);
}
}
return TRUE;
}
/***********************************************************************
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment