win32u: Move SendMessageW 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-04 16:57:52 +02:00 committed by Alexandre Julliard
parent 74da33b791
commit 30cc496099
4 changed files with 15 additions and 22 deletions

View File

@ -2217,19 +2217,7 @@ LRESULT WINAPI SendMessageTimeoutA( HWND hwnd, UINT msg, WPARAM wparam, LPARAM l
*/
LRESULT WINAPI SendMessageW( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam )
{
DWORD_PTR res = 0;
struct send_message_info info;
info.type = MSG_UNICODE;
info.hwnd = hwnd;
info.msg = msg;
info.wparam = wparam;
info.lparam = lparam;
info.flags = SMTO_NORMAL;
info.timeout = 0;
send_message( &info, &res, TRUE );
return res;
return NtUserMessageCall( hwnd, msg, wparam, lparam, NULL, FNID_SENDMESSAGE, FALSE );
}

View File

@ -165,8 +165,6 @@ static const struct user_callbacks user_funcs =
EndMenu,
HideCaret,
PostMessageW,
SendMessageA,
SendMessageW,
SendNotifyMessageW,
SetSystemMenu,
ShowCaret,

View File

@ -2234,11 +2234,20 @@ BOOL kill_system_timer( HWND hwnd, UINT_PTR id )
static LRESULT send_window_message( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam, BOOL ansi )
{
/* FIXME: move implementation from user32 */
if (!user_callbacks) return FALSE;
return ansi
? user_callbacks->pSendMessageA( hwnd, msg, wparam, lparam )
: user_callbacks->pSendMessageW( hwnd, msg, wparam, lparam );
struct send_message_info info;
DWORD_PTR res = 0;
info.type = ansi ? MSG_ASCII : MSG_UNICODE;
info.hwnd = hwnd;
info.msg = msg;
info.wparam = wparam;
info.lparam = lparam;
info.flags = SMTO_NORMAL;
info.timeout = 0;
info.wm_char = WMCHAR_MAP_SENDMESSAGETIMEOUT;
process_message( &info, &res, ansi );
return res;
}
/* see SendMessageTimeoutW */

View File

@ -38,8 +38,6 @@ struct user_callbacks
BOOL (WINAPI *pEndMenu)(void);
BOOL (WINAPI *pHideCaret)( HWND hwnd );
BOOL (WINAPI *pPostMessageW)( HWND, UINT, WPARAM, LPARAM );
LRESULT (WINAPI *pSendMessageA)( HWND, UINT, WPARAM, LPARAM );
LRESULT (WINAPI *pSendMessageW)( HWND, UINT, WPARAM, LPARAM );
BOOL (WINAPI *pSendNotifyMessageW)( HWND, UINT, WPARAM, LPARAM );
BOOL (WINAPI *pSetSystemMenu)( HWND hwnd, HMENU menu );
BOOL (WINAPI *pShowCaret)( HWND hwnd );