X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bd3b171d3f45b0d30d6c1f7586dad5721b145650..8ccff7d2116057a0e79db28491a6c7fdf4051a58:/include/wx/os2/private.h diff --git a/include/wx/os2/private.h b/include/wx/os2/private.h index 3f8256b982..74c0a023d6 100644 --- a/include/wx/os2/private.h +++ b/include/wx/os2/private.h @@ -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