X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/546db2a8f8e9975eba9e54d7f4b7f3546a4a515d..bfac8499858dbb52ae4e712b718dcd08e777b4c2:/src/msw/app.cpp diff --git a/src/msw/app.cpp b/src/msw/app.cpp index dc629191c1..0c339a6a79 100644 --- a/src/msw/app.cpp +++ b/src/msw/app.cpp @@ -43,12 +43,14 @@ #include "wx/msgdlg.h" #include "wx/intl.h" #include "wx/dynarray.h" + #include "wx/wxchar.h" #endif -#include "wx/msw/private.h" #include "wx/log.h" #include "wx/module.h" +#include "wx/msw/private.h" + #if wxUSE_THREADS #include "wx/thread.h" @@ -84,6 +86,7 @@ #include "wx/msw/msvcrt.h" + // --------------------------------------------------------------------------- // global variables // --------------------------------------------------------------------------- @@ -234,8 +237,12 @@ bool wxApp::Initialize() LOGBRUSH lb; lb.lbStyle = BS_PATTERN; lb.lbHatch = (int)LoadBitmap( wxhInstance, "wxDISABLE_BUTTON_BITMAP" ); - wxDisableButtonBrush = ::CreateBrushIndirect( & lb ); - ::DeleteObject( (HGDIOBJ)lb.lbHatch ); + if ( lb.lbHatch ) + { + wxDisableButtonBrush = ::CreateBrushIndirect( & lb ); + ::DeleteObject( (HGDIOBJ)lb.lbHatch ); + } + //else: wxWindows resources are probably not linked in #if wxUSE_PENWINDOWS wxRegisterPenWin(); @@ -1117,7 +1124,11 @@ bool wxYield() MSG msg; // We want to go back to the main message loop // if we see a WM_QUIT. (?) +#ifdef __WXWINE__ + while (PeekMessage(&msg, (HWND)NULL, 0, 0, PM_NOREMOVE) && msg.message != WM_QUIT) +#else while (PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE) && msg.message != WM_QUIT) +#endif { if ( !wxTheApp->DoMessage() ) break;