Commit 926f5bb4 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

user32: Use GetMenuInfo for IsMenu implementation.

parent 000b637f
......@@ -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;
}
/**********************************************************************
......
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