Commit 9f267c22 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

win32u: Move GetMenuItemID implementation from user32.

parent 0868ca15
......@@ -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 );
}
......
......@@ -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 );
......
......@@ -224,6 +224,7 @@ enum
NtUserSetMenuItemInfo,
NtUserInsertMenuItem,
/* Wine extensions */
NtUserGetMenuItemID,
NtUserGetMenuItemInfoA,
NtUserGetMenuItemInfoW,
NtUserGetMenuState,
......
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