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:
@@ -268,6 +268,20 @@ WXDLLEXPORT HINSTANCE wxGetInstance();
|
|||||||
|
|
||||||
WXDLLEXPORT void wxSetInstance(HINSTANCE hInst);
|
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
|
#if wxUSE_GUI
|
||||||
|
|
||||||
WXDLLEXPORT void wxDrawBorder( HPS hPS
|
WXDLLEXPORT void wxDrawBorder( HPS hPS
|
||||||
|
Reference in New Issue
Block a user