mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-02 01:00:22 +02:00
LCL-Win32: Fix hints in mainmenu's submenus. Issue #33070, patch from Serge Anvarov.
git-svn-id: trunk@57147 -
This commit is contained in:
parent
47ca6a4009
commit
cfb33a15c7
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user