diff --git a/dlls/user32/message.c b/dlls/user32/message.c index 138c8d73941..d54d5b55e50 100644 --- a/dlls/user32/message.c +++ b/dlls/user32/message.c @@ -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 ); } diff --git a/dlls/user32/user_main.c b/dlls/user32/user_main.c index 789533329c3..3fd05ec3f01 100644 --- a/dlls/user32/user_main.c +++ b/dlls/user32/user_main.c @@ -165,8 +165,6 @@ static const struct user_callbacks user_funcs = EndMenu, HideCaret, PostMessageW, - SendMessageA, - SendMessageW, SendNotifyMessageW, SetSystemMenu, ShowCaret, diff --git a/dlls/win32u/message.c b/dlls/win32u/message.c index 359a3cadbab..41d97e648a0 100644 --- a/dlls/win32u/message.c +++ b/dlls/win32u/message.c @@ -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 */ diff --git a/dlls/win32u/ntuser_private.h b/dlls/win32u/ntuser_private.h index d69e24a1dab..f9623446f6d 100644 --- a/dlls/win32u/ntuser_private.h +++ b/dlls/win32u/ntuser_private.h @@ -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 );