GetMenuItemID: return -1 for invalid menu items, not zero.
This commit is contained in:
parent
4be97b6696
commit
34329cf58e
|
@ -3476,7 +3476,7 @@ UINT WINAPI GetMenuItemID( HMENU hMenu, INT nPos )
|
|||
{
|
||||
MENUITEM * lpmi;
|
||||
|
||||
if (!(lpmi = MENU_FindItem(&hMenu,&nPos,MF_BYPOSITION))) return 0;
|
||||
if (!(lpmi = MENU_FindItem(&hMenu,&nPos,MF_BYPOSITION))) return -1;
|
||||
if (lpmi->fType & MF_POPUP) return -1;
|
||||
return lpmi->wID;
|
||||
|
||||
|
|
Loading…
Reference in New Issue