]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/app.cpp
makefile for wxLayout sample
[wxWidgets.git] / src / msw / app.cpp
index 6305cb017f97bb23b10986a000e36215dd7a63d5..07a2d29ccd26273fe84ea0ac9ac6b00c3de42342 100644 (file)
@@ -234,8 +234,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();