diff --git a/dlls/user32/win.c b/dlls/user32/win.c index 4d4199c67fc..22227c23280 100644 --- a/dlls/user32/win.c +++ b/dlls/user32/win.c @@ -2249,17 +2249,7 @@ BOOL WINAPI FlashWindow( HWND hWnd, BOOL bInvert ) */ DWORD WINAPI GetWindowContextHelpId( HWND hwnd ) { - DWORD retval; - WND *wnd = WIN_GetPtr( hwnd ); - if (!wnd || wnd == WND_DESKTOP) return 0; - if (wnd == WND_OTHER_PROCESS) - { - if (IsWindow( hwnd )) FIXME( "not supported on other process window %p\n", hwnd ); - return 0; - } - retval = wnd->helpContext; - WIN_ReleasePtr( wnd ); - return retval; + return NtUserCallHwnd( hwnd, NtUserGetWindowContextHelpId ); } diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c index ab69096184c..e513a13b152 100644 --- a/dlls/win32u/window.c +++ b/dlls/win32u/window.c @@ -3913,6 +3913,22 @@ BOOL WINAPI NtUserFlashWindowEx( FLASHWINFO *info ) } } +/* see GetWindowContextHelpId */ +static DWORD get_window_context_help_id( HWND hwnd ) +{ + DWORD retval; + WND *win = get_win_ptr( hwnd ); + if (!win || win == WND_DESKTOP) return 0; + if (win == WND_OTHER_PROCESS) + { + if (is_window( hwnd )) FIXME( "not supported on other process window %p\n", hwnd ); + return 0; + } + retval = win->helpContext; + release_win_ptr( win ); + return retval; +} + /*********************************************************************** * send_destroy_message */ @@ -4190,6 +4206,8 @@ ULONG_PTR WINAPI NtUserCallHwnd( HWND hwnd, DWORD code ) return get_dpi_for_window( hwnd ); case NtUserGetParent: return HandleToUlong( get_parent( hwnd )); + case NtUserGetWindowContextHelpId: + return get_window_context_help_id( hwnd ); case NtUserGetWindowDpiAwarenessContext: return (ULONG_PTR)get_window_dpi_awareness_context( hwnd ); case NtUserGetWindowTextLength: diff --git a/include/ntuser.h b/include/ntuser.h index 6526d190e28..7bcb91fcc25 100644 --- a/include/ntuser.h +++ b/include/ntuser.h @@ -147,6 +147,7 @@ enum { NtUserGetDpiForWindow, NtUserGetParent, + NtUserGetWindowContextHelpId, NtUserGetWindowDpiAwarenessContext, NtUserGetWindowTextLength, NtUserIsWindow,