From 24677dd4d9fd0b6079ef7742f3e71bff13df81e9 Mon Sep 17 00:00:00 2001 From: Steve Lustbader Date: Thu, 21 Nov 2002 23:44:58 +0000 Subject: [PATCH] Have PostMessage call PostThreadMessage when hwnd is NULL. --- dlls/user/message.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/user/message.c b/dlls/user/message.c index ef1ab2b72e..888b44a9ce 100644 --- a/dlls/user/message.c +++ b/dlls/user/message.c @@ -2006,6 +2006,9 @@ BOOL WINAPI PostMessageW( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam ) EnumWindows( broadcast_message_callback, (LPARAM)&info ); return TRUE; } + + if (!hwnd) return PostThreadMessageW( GetCurrentThreadId(), msg, wparam, lparam ); + if (!(dest_tid = GetWindowThreadProcessId( hwnd, NULL ))) return FALSE; if (USER_IsExitingThread( dest_tid )) return TRUE;