]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/resource.cpp
somebody added #ifdefed #pragma to disable warnings about // in c source, instead...
[wxWidgets.git] / src / common / resource.cpp
index cd930265e039c8438845ed9e4079cd11af4262e7..19ffdaef1bb55c8bc69e95d8ebc4df38324d8d10 100644 (file)
@@ -347,7 +347,7 @@ wxControl *wxResourceTable::CreateItem(wxWindow *parent, const wxItemResource* c
    else if (itemType == wxString(wxT("wxMessage")) || itemType == wxString(wxT("wxStaticText")) ||
          itemType == wxString(wxT("wxStaticBitmap")))
       {
-        if (childResource->GetValue4() != wxT(""))
+        if (childResource->GetValue4() != wxT("") || itemType == wxString(wxT("wxStaticBitmap")) )
         {
           // Bitmap message
           wxBitmap bitmap = childResource->GetBitmap();
@@ -357,6 +357,12 @@ wxControl *wxResourceTable::CreateItem(wxWindow *parent, const wxItemResource* c
             ((wxItemResource*) childResource)->SetBitmap(bitmap);
           }
 #if wxUSE_BITMAP_MESSAGE
+#ifdef __WXMSW__
+          // Use a default bitmap
+          if (!bitmap.Ok())
+             bitmap.LoadFile("cross_bmp", wxBITMAP_TYPE_BMP_RESOURCE);
+#endif
+
           if (bitmap.Ok())
            control = new wxStaticBitmap(parent, id, bitmap, pos, size,
              childResource->GetStyle(), childResource->GetName());