mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 14:24:45 +00:00
win32u: Move GetMenuItemID implementation from user32.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
This commit is contained in:
parent
0868ca1578
commit
9f267c2258
3 changed files with 9 additions and 10 deletions
|
@ -537,17 +537,9 @@ INT WINAPI GetMenuItemCount( HMENU menu )
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* GetMenuItemID (USER32.@)
|
* GetMenuItemID (USER32.@)
|
||||||
*/
|
*/
|
||||||
UINT WINAPI GetMenuItemID( HMENU hMenu, INT nPos )
|
UINT WINAPI GetMenuItemID( HMENU menu, INT pos )
|
||||||
{
|
{
|
||||||
POPUPMENU *menu;
|
return NtUserThunkedMenuItemInfo( menu, pos, MF_BYPOSITION, NtUserGetMenuItemID, NULL, NULL );
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1121,6 +1121,12 @@ UINT WINAPI NtUserThunkedMenuItemInfo( HMENU handle, UINT pos, UINT flags, UINT
|
||||||
|
|
||||||
switch (method)
|
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:
|
case NtUserGetMenuItemInfoA:
|
||||||
return get_menu_item_info( handle, pos, flags, info, TRUE );
|
return get_menu_item_info( handle, pos, flags, info, TRUE );
|
||||||
|
|
||||||
|
|
|
@ -224,6 +224,7 @@ enum
|
||||||
NtUserSetMenuItemInfo,
|
NtUserSetMenuItemInfo,
|
||||||
NtUserInsertMenuItem,
|
NtUserInsertMenuItem,
|
||||||
/* Wine extensions */
|
/* Wine extensions */
|
||||||
|
NtUserGetMenuItemID,
|
||||||
NtUserGetMenuItemInfoA,
|
NtUserGetMenuItemInfoA,
|
||||||
NtUserGetMenuItemInfoW,
|
NtUserGetMenuItemInfoW,
|
||||||
NtUserGetMenuState,
|
NtUserGetMenuState,
|
||||||
|
|
Loading…
Reference in a new issue