- return Create((void *)data, wxBITMAP_TYPE_XPM_DATA, 0, 0, 0);
+ wxCHECK_MSG( data != NULL, FALSE, wxT("invalid bitmap data") )
+
+ wxXPMDecoder decoder;
+ wxImage img = decoder.ReadData(data);
+ wxCHECK_MSG( img.Ok(), FALSE, wxT("invalid bitmap data") )
+
+ *this = wxBitmap(img);
+ return TRUE;
+#else
+ return FALSE;
+#endif