]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/app.cpp
Correct some minor compile pbs with VC++1.52c & VC++4.1
[wxWidgets.git] / src / msw / app.cpp
index 6305cb017f97bb23b10986a000e36215dd7a63d5..0c339a6a797970b5e09382327266d6425c3e13c7 100644 (file)
     #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();