X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/09914df7b85fe17845223b291ab65925dceba6f2..b1a39f47f8e4e9662ecdecab8f38fca1342202a7:/src/common/resource.cpp diff --git a/src/common/resource.cpp b/src/common/resource.cpp index 031a211c74..a3c99026f9 100644 --- a/src/common/resource.cpp +++ b/src/common/resource.cpp @@ -22,7 +22,7 @@ #if wxUSE_WX_RESOURCES -#ifdef _MSC_VER +#ifdef __VISUALC__ #pragma warning(disable:4706) // assignment within conditional expression #endif // VC++ @@ -823,10 +823,14 @@ wxItemResource *wxResourceInterpretControl(wxResourceTable& table, wxExpr *expr) // Check for bitmap resource name (in case loading old-style resource file) if (expr->Nth(count) && ((expr->Nth(count)->Type() == PrologString) || (expr->Nth(count)->Type() == PrologWord))) { - wxString str(expr->Nth(count)->StringValue()); - controlItem->SetValue4(str); count ++; - controlItem->SetType("wxBitmapButton"); + wxString str(expr->Nth(count)->StringValue()); + + if (str != "") + { + controlItem->SetValue4(str); + controlItem->SetType("wxBitmapButton"); + } } if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList) controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count))); @@ -2173,7 +2177,7 @@ wxBitmap wxResourceCreateBitmap(const wxString& resource, wxResourceTable *table "Forgot to use wxResourceLoadBitmapData?"), (const char*) name); return wxNullBitmap; } - return wxBitmap(item->GetValue1()); + return wxBitmap((char **)item->GetValue1()); #else wxLogWarning(_("No XPM facility available!")); #endif @@ -2916,7 +2920,7 @@ wxControl *wxWindow::CreateItem(const wxItemResource *resource, const wxItemReso return table->CreateItem((wxWindow *)this, resource, parentResource); } -#ifdef _MSC_VER +#ifdef __VISUALC__ #pragma warning(default:4706) // assignment within conditional expression #endif // VC++