win32u: Move GetMenuItemID implementation from user32.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
This commit is contained in:
Jacek Caban 2022-06-21 13:52:55 +02:00 committed by Alexandre Julliard
parent 0868ca1578
commit 9f267c2258
3 changed files with 9 additions and 10 deletions

View file

@ -537,17 +537,9 @@ INT WINAPI GetMenuItemCount( HMENU menu )
/**********************************************************************
* GetMenuItemID (USER32.@)
*/
UINT WINAPI GetMenuItemID( HMENU hMenu, INT nPos )
UINT WINAPI GetMenuItemID( HMENU menu, INT pos )
{
POPUPMENU *menu;
UINT id, pos;
if (!(menu = find_menu_item(hMenu, nPos, MF_BYPOSITION, &pos)))
return -1;
id = menu->items[pos].fType & MF_POPUP ? -1 : menu->items[pos].wID;
release_menu_ptr(menu);
return id;
return NtUserThunkedMenuItemInfo( menu, pos, MF_BYPOSITION, NtUserGetMenuItemID, NULL, NULL );
}

View file

@ -1121,6 +1121,12 @@ UINT WINAPI NtUserThunkedMenuItemInfo( HMENU handle, UINT pos, UINT flags, UINT
switch (method)
{
case NtUserGetMenuItemID:
if (!(menu = find_menu_item( handle, pos, flags, &i ))) return -1;
ret = menu->items[i].fType & MF_POPUP ? -1 : menu->items[i].wID;
release_menu_ptr( menu );
break;
case NtUserGetMenuItemInfoA:
return get_menu_item_info( handle, pos, flags, info, TRUE );

View file

@ -224,6 +224,7 @@ enum
NtUserSetMenuItemInfo,
NtUserInsertMenuItem,
/* Wine extensions */
NtUserGetMenuItemID,
NtUserGetMenuItemInfoA,
NtUserGetMenuItemInfoW,
NtUserGetMenuState,