#if wxUSE_WX_RESOURCES
-#ifdef _MSC_VER
+#ifdef __VISUALC__
#pragma warning(disable:4706) // assignment within conditional expression
#endif // VC++
return TRUE;
}
-static char *g_ValidControlClasses[] = { "wxButton", "wxBitmapButton", "wxMessage",
- "wxStaticText", "wxStaticBitmap", "wxText", "wxTextCtrl", "wxMultiText",
- "wxListBox", "wxRadioBox", "wxRadioButton", "wxCheckBox", "wxBitmapCheckBox",
- "wxGroupBox", "wxStaticBox", "wxSlider", "wxGauge", "wxScrollBar",
- "wxChoice", "wxComboBox" } ;
-static int g_ValidControlClassesCount = sizeof(g_ValidControlClasses) / sizeof(char *) ;
+static const char *g_ValidControlClasses[] =
+{
+ "wxButton",
+ "wxBitmapButton",
+ "wxMessage",
+ "wxStaticText",
+ "wxStaticBitmap",
+ "wxText",
+ "wxTextCtrl",
+ "wxMultiText",
+ "wxListBox",
+ "wxRadioBox",
+ "wxRadioButton",
+ "wxCheckBox",
+ "wxBitmapCheckBox",
+ "wxGroupBox",
+ "wxStaticBox",
+ "wxSlider",
+ "wxGauge",
+ "wxScrollBar",
+ "wxChoice",
+ "wxComboBox"
+};
static bool wxIsValidControlClass(const wxString& c)
{
- int i;
- for ( i = 0; i < g_ValidControlClassesCount; i++)
+ for ( size_t i = 0; i < WXSIZEOF(g_ValidControlClasses); i++ )
{
if ( c == g_ValidControlClasses[i] )
return TRUE;
"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
return table->CreateItem((wxWindow *)this, resource, parentResource);
}
-#ifdef _MSC_VER
+#ifdef __VISUALC__
#pragma warning(default:4706) // assignment within conditional expression
#endif // VC++