diff --git a/dlls/user32/winproc.c b/dlls/user32/winproc.c index 1363aad3340..8d6f89eaa6f 100644 --- a/dlls/user32/winproc.c +++ b/dlls/user32/winproc.c @@ -853,23 +853,11 @@ BOOL unpack_message( HWND hwnd, UINT message, WPARAM *wparam, LPARAM *lparam, case WM_COMPAREITEM: case WM_WINDOWPOSCHANGING: case WM_WINDOWPOSCHANGED: + case WM_HELP: break; case WM_NOTIFY: /* WM_NOTIFY cannot be sent across processes (MSDN) */ return FALSE; - case WM_HELP: - { - HELPINFO hi; - if (size < sizeof(ps->hi)) return FALSE; - hi.cbSize = sizeof(hi); - hi.iContextType = ps->hi.iContextType; - hi.iCtrlId = ps->hi.iCtrlId; - hi.hItemHandle = unpack_handle( ps->hi.hItemHandle ); - hi.dwContextId = (ULONG_PTR)unpack_ptr( ps->hi.dwContextId ); - hi.MousePos = ps->hi.MousePos; - memcpy( &ps->hi, &hi, sizeof(hi) ); - break; - } case WM_STYLECHANGING: case WM_STYLECHANGED: minsize = sizeof(STYLESTRUCT); @@ -1114,6 +1102,7 @@ BOOL WINAPI User32CallWindowProc( struct win_proc_params *params, ULONG size ) case WM_WINDOWPOSCHANGING: case WM_WINDOWPOSCHANGED: case WM_COPYDATA: + case WM_HELP: { LRESULT *result_ptr = (LRESULT *)buffer - 1; *result_ptr = result; diff --git a/dlls/win32u/message.c b/dlls/win32u/message.c index 5cadaa9e75b..7a3acf13ba5 100644 --- a/dlls/win32u/message.c +++ b/dlls/win32u/message.c @@ -523,6 +523,19 @@ static BOOL unpack_message( HWND hwnd, UINT message, WPARAM *wparam, LPARAM *lpa memcpy( &ps->cds, &cds, sizeof(cds) ); break; } + case WM_HELP: + { + HELPINFO hi; + if (size < sizeof(ps->hi)) return FALSE; + hi.cbSize = sizeof(hi); + hi.iContextType = ps->hi.iContextType; + hi.iCtrlId = ps->hi.iCtrlId; + hi.hItemHandle = wine_server_ptr_handle( ps->hi.hItemHandle ); + hi.dwContextId = (ULONG_PTR)unpack_ptr( ps->hi.dwContextId ); + hi.MousePos = ps->hi.MousePos; + memcpy( &ps->hi, &hi, sizeof(hi) ); + break; + } case WM_WINE_SETWINDOWPOS: { WINDOWPOS wp; @@ -1332,6 +1345,9 @@ size_t user_message_size( UINT message, WPARAM wparam, LPARAM lparam, BOOL other size = sizeof(*cds) + cds->cbData; break; } + case WM_HELP: + size = sizeof(HELPINFO); + break; } return size; diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c index 429854f1950..5914a8d6d4e 100644 --- a/dlls/wow64win/user.c +++ b/dlls/wow64win/user.c @@ -218,6 +218,16 @@ typedef struct ULONG lpData; } COPYDATASTRUCT32; +typedef struct +{ + UINT cbSize; + INT iContextType; + INT iCtrlId; + ULONG hItemHandle; + DWORD dwContextId; + POINT MousePos; +} HELPINFO32; + typedef struct { UINT CtlType; @@ -734,6 +744,20 @@ static size_t packed_message_64to32( UINT message, WPARAM wparam, if (size) memmove( (char *)params32 + sizeof(cds32), cds64 + 1, size ); return sizeof(cds32) + size; } + case WM_HELP: + { + HELPINFO32 hi32; + const HELPINFO *hi64 = params64; + + hi32.cbSize = sizeof(hi32); + hi32.iContextType = hi64->iContextType; + hi32.iCtrlId = hi64->iCtrlId; + hi32.hItemHandle = HandleToLong( hi64->hItemHandle ); + hi32.dwContextId = hi64->dwContextId; + hi32.MousePos = hi64->MousePos; + memcpy( params32, &hi32, sizeof(hi32) ); + return sizeof(hi32); + } } memmove( params32, params64, size ); @@ -3280,6 +3304,20 @@ static LRESULT message_call_32to64( HWND hwnd, UINT msg, WPARAM wparam, LPARAM l return NtUserMessageCall( hwnd, msg, wparam, (LPARAM)&cds, result_info, type, ansi ); } + case WM_HELP: + { + HELPINFO32 *hi32 = (void *)lparam; + HELPINFO hi64; + + hi64.cbSize = sizeof(hi64); + hi64.iContextType = hi32->iContextType; + hi64.iCtrlId = hi32->iCtrlId; + hi64.hItemHandle = LongToHandle( hi32->hItemHandle ); + hi64.dwContextId = hi32->dwContextId; + hi64.MousePos = hi32->MousePos; + return NtUserMessageCall( hwnd, msg, wparam, (LPARAM)&hi64, result_info, type, ansi ); + } + case WM_GETDLGCODE: if (lparam) {