GetMenuItemID: return -1 for invalid menu items, not zero.

This commit is contained in:
Mike McCormack 2001-07-10 19:06:12 +00:00 committed by Alexandre Julliard
parent 4be97b6696
commit 34329cf58e
1 changed files with 1 additions and 1 deletions

View File

@ -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;