mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-15 20:19:50 +02:00
Revert r60679 #f9b4f6ae8d, LCL-Win32 calling OnClick of a parent menuitem. Issue #37210.
git-svn-id: trunk@63518 -
This commit is contained in:
parent
0a2fde2d2c
commit
c8da630845
@ -441,18 +441,14 @@ end;
|
||||
|
||||
function TWindowProcHelper.GetPopMenuItemObject: TObject;
|
||||
var
|
||||
MenuHandle: HMENU;
|
||||
MainMenuHandle: HMENU;
|
||||
MenuInfo: MENUITEMINFO;
|
||||
begin
|
||||
MenuInfo.cbSize := MMenuItemInfoSize;
|
||||
MenuInfo.fMask := MIIM_DATA;
|
||||
|
||||
MenuHandle := 0;
|
||||
if Assigned(WindowInfo^.PopupMenu) then
|
||||
MenuHandle := GetMenuParent(HMENU(WParam), WindowInfo^.PopupMenu.Handle);
|
||||
if MenuHandle = 0 then
|
||||
MenuHandle := GetMenuParent(HMENU(WParam), GetMenu(Window));
|
||||
if GetMenuItemInfo(MenuHandle, LOWORD(LParam), true, @MenuInfo) then
|
||||
MainMenuHandle := GetMenuParent(HMENU(WParam), GetMenu(Window));
|
||||
if GetMenuItemInfo(MainMenuHandle, LOWORD(LParam), true, @MenuInfo) then
|
||||
Result := TObject(MenuInfo.dwItemData)
|
||||
else
|
||||
Result := nil;
|
||||
|
Loading…
Reference in New Issue
Block a user