Commit cfb33a15 authored by Juha Manninen's avatar Juha Manninen
Browse files

LCL-Win32: Fix hints in mainmenu's submenus. Issue #33070, patch from Serge Anvarov.

git-svn-id: trunk@57147 -
parent 47ca6a40
......@@ -438,6 +438,7 @@ function TWindowProcHelper.GetMenuItemObject(ByPosition: Boolean): TObject;
var
MenuInfo: MENUITEMINFO;
PopupMenu: TPopupMenu;
Menu: HMENU;
begin
// first we have to decide if the command is from a popup menu
// or from the window main menu
......@@ -456,7 +457,11 @@ begin
MenuInfo.cbSize := MMenuItemInfoSize;
MenuInfo.fMask := MIIM_DATA;
if GetMenuItemInfo(GetMenu(Window), LOWORD(Integer(WParam)), ByPosition, @MenuInfo) then
if ByPosition then
Menu := LParam
else
Menu := GetMenu(Window);
if GetMenuItemInfo(Menu, LOWORD(Integer(WParam)), ByPosition, @MenuInfo) then
Result := TObject(MenuInfo.dwItemData)
else
Result := nil;
......
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