From: Jacek Caban jacek@codeweavers.com
Signed-off-by: Jacek Caban jacek@codeweavers.com --- dlls/user32/menu.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-)
diff --git a/dlls/user32/menu.c b/dlls/user32/menu.c index cc6c5c953e9..cf68aaff31b 100644 --- a/dlls/user32/menu.c +++ b/dlls/user32/menu.c @@ -4482,19 +4482,16 @@ HMENU WINAPI LoadMenuIndirectA( LPCVOID template ) /********************************************************************** * IsMenu (USER32.@) */ -BOOL WINAPI IsMenu(HMENU hmenu) +BOOL WINAPI IsMenu( HMENU menu ) { - POPUPMENU *menu; - BOOL is_menu; - - menu = grab_menu_ptr(hmenu); - is_menu = menu != NULL; - release_menu_ptr(menu); + MENUINFO info;
- if (!is_menu) - SetLastError(ERROR_INVALID_MENU_HANDLE); + info.cbSize = sizeof(info); + info.fMask = 0; + if (GetMenuInfo( menu, &info )) return TRUE;
- return is_menu; + SetLastError(ERROR_INVALID_MENU_HANDLE); + return FALSE; }
/**********************************************************************