Insure that messages are posted to the main threads event loop,

instead of sending them to the thread-local event loop
        (which typically does not exist under wxWindows).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23421 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Neis 2003-09-07 17:50:12 +00:00
parent ad0500fb78
commit d4ca5c8c7b

View File

@ -268,6 +268,20 @@ WXDLLEXPORT HINSTANCE wxGetInstance();
WXDLLEXPORT void wxSetInstance(HINSTANCE hInst);
#include "wx/thread.h"
static inline MRESULT MySendMsg(HWND hwnd, ULONG ulMsgid,
MPARAM mpParam1, MPARAM mpParam2)
{
MRESULT vRes;
vRes = ::WinSendMsg(hwnd, ulMsgid, mpParam1, mpParam2);
#if wxUSE_THREADS
if (!wxThread::IsMain())
::WinPostMsg(hwnd, ulMsgid, mpParam1, mpParam2);
#endif
return vRes;
}
#define WinSendMsg MySendMsg
#if wxUSE_GUI
WXDLLEXPORT void wxDrawBorder( HPS hPS