Jacek Caban : user32: Reimplement GetMenuContextHelpId on top of GetMenuInfo.
Alexandre Julliard
julliard at winehq.org
Tue Jun 14 15:56:50 CDT 2022
Module: wine
Branch: master
Commit: eda3732afda87367d8196f360ee07c833be275d2
URL: https://source.winehq.org/git/wine.git/?a=commit;h=eda3732afda87367d8196f360ee07c833be275d2
Author: Jacek Caban <jacek at codeweavers.com>
Date: Sat Jun 11 02:20:22 2022 +0200
user32: Reimplement GetMenuContextHelpId on top of GetMenuInfo.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
---
dlls/user32/menu.c | 19 ++++++-------------
1 file changed, 6 insertions(+), 13 deletions(-)
diff --git a/dlls/user32/menu.c b/dlls/user32/menu.c
index f5b74a24c25..73aee6b849d 100644
--- a/dlls/user32/menu.c
+++ b/dlls/user32/menu.c
@@ -4309,20 +4309,13 @@ BOOL WINAPI GetMenuInfo( HMENU menu, MENUINFO *info )
/**********************************************************************
* GetMenuContextHelpId (USER32.@)
*/
-DWORD WINAPI GetMenuContextHelpId( HMENU hMenu )
+DWORD WINAPI GetMenuContextHelpId( HMENU menu )
{
- DWORD help_id = 0;
- POPUPMENU *menu;
-
- TRACE("(%p)\n", hMenu);
-
- if ((menu = grab_menu_ptr(hMenu)))
- {
- help_id = menu->dwContextHelpID;
- release_menu_ptr(menu);
- }
-
- return help_id;
+ MENUINFO info;
+ TRACE( "(%p)\n", menu );
+ info.cbSize = sizeof(info);
+ info.fMask = MIM_HELPID;
+ return GetMenuInfo( menu, &info ) ? info.dwContextHelpID : 0;
}
/**********************************************************************
More information about the wine-cvs
mailing list