win32u: Move NtUserSetMenuContextHelpId implementation from user32.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2022-04-20 15:56:50 +02:00 committed by Alexandre Julliard
parent f57a3916e8
commit d275253f5d
8 changed files with 28 additions and 21 deletions

View file

@ -5255,25 +5255,6 @@ BOOL WINAPI GetMenuInfo (HMENU hMenu, LPMENUINFO lpmi)
}
/**********************************************************************
* SetMenuContextHelpId (USER32.@)
*/
BOOL WINAPI SetMenuContextHelpId( HMENU hMenu, DWORD dwContextHelpID)
{
POPUPMENU *menu;
TRACE("(%p 0x%08x)\n", hMenu, dwContextHelpID);
if ((menu = grab_menu_ptr(hMenu)))
{
menu->dwContextHelpID = dwContextHelpID;
release_menu_ptr(menu);
return TRUE;
}
return FALSE;
}
/**********************************************************************
* GetMenuContextHelpId (USER32.@)
*/

View file

@ -679,7 +679,7 @@
@ stdcall SetLayeredWindowAttributes(ptr long long long) NtUserSetLayeredWindowAttributes
@ stdcall SetLogonNotifyWindow(long long)
@ stdcall SetMenu(long long)
@ stdcall SetMenuContextHelpId(long long)
@ stdcall SetMenuContextHelpId(long long) NtUserSetMenuContextHelpId
@ stdcall SetMenuDefaultItem(long long long)
@ stdcall SetMenuInfo(long ptr)
@ stdcall SetMenuItemBitmaps(long long long long long)

View file

@ -347,3 +347,18 @@ BOOL draw_menu_bar( HWND hwnd )
return NtUserSetWindowPos( hwnd, 0, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE |
SWP_NOACTIVATE | SWP_NOZORDER | SWP_FRAMECHANGED );
}
/**********************************************************************
* NtUserSetMenuContextHelpId (win32u.@)
*/
BOOL WINAPI NtUserSetMenuContextHelpId( HMENU handle, DWORD id )
{
POPUPMENU *menu;
TRACE( "(%p 0x%08x)\n", handle, id );
if (!(menu = grab_menu_ptr( handle ))) return FALSE;
menu->dwContextHelpID = id;
release_menu_ptr( menu );
return TRUE;
}

View file

@ -155,6 +155,7 @@ static void * const syscalls[] =
NtUserRemoveClipboardFormatListener,
NtUserRemoveProp,
NtUserSetKeyboardState,
NtUserSetMenuContextHelpId,
NtUserSetObjectInformation,
NtUserSetProcessDpiAwarenessContext,
NtUserSetProcessWindowStation,

View file

@ -1207,7 +1207,7 @@
@ stub NtUserSetMagnificationDesktopMagnifierOffsetsDWMUpdated
@ stub NtUserSetManipulationInputTarget
@ stub NtUserSetMenu
@ stub NtUserSetMenuContextHelpId
@ stdcall -syscall NtUserSetMenuContextHelpId(long long)
@ stub NtUserSetMenuDefaultItem
@ stub NtUserSetMenuFlagRtoL
@ stub NtUserSetMirrorRendering

View file

@ -142,6 +142,7 @@
SYSCALL_ENTRY( NtUserRemoveClipboardFormatListener ) \
SYSCALL_ENTRY( NtUserRemoveProp ) \
SYSCALL_ENTRY( NtUserSetKeyboardState ) \
SYSCALL_ENTRY( NtUserSetMenuContextHelpId ) \
SYSCALL_ENTRY( NtUserSetObjectInformation ) \
SYSCALL_ENTRY( NtUserSetProcessDpiAwarenessContext ) \
SYSCALL_ENTRY( NtUserSetProcessWindowStation ) \

View file

@ -641,3 +641,11 @@ NTSTATUS WINAPI wow64_NtUserCheckMenuItem( UINT *args )
return NtUserCheckMenuItem( handle, id, flags );
}
NTSTATUS WINAPI wow64_NtUserSetMenuContextHelpId( UINT *args )
{
HMENU menu = get_handle( &args );
DWORD id = get_ulong( &args );
return NtUserSetMenuContextHelpId( menu, id );
}

View file

@ -553,6 +553,7 @@ BOOL WINAPI NtUserSetCursorPos( INT x, INT y );
HWND WINAPI NtUserSetFocus( HWND hwnd );
BOOL WINAPI NtUserSetKeyboardState( BYTE *state );
BOOL WINAPI NtUserSetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alpha, DWORD flags );
BOOL WINAPI NtUserSetMenuContextHelpId( HMENU handle, DWORD id );
HWND WINAPI NtUserSetParent( HWND hwnd, HWND parent );
BOOL WINAPI NtUserSetProcessDpiAwarenessContext( ULONG awareness, ULONG unknown );
BOOL WINAPI NtUserSetProcessWindowStation( HWINSTA handle );