}
// Create from XPM data
-wxBitmap::wxBitmap(char **data, wxItem *WXUNUSED(anItem))
+wxBitmap::wxBitmap(char **data, wxControl *WXUNUSED(anItem))
{
(void) Create((void *)data, wxBITMAP_TYPE_XPM_DATA, 0, 0, 0);
}
M_BITMAPHANDLERDATA->m_hBitmap = (WXHBITMAP) ::LoadBitmap(wxGetInstance(), name);
if (M_BITMAPHANDLERDATA->m_hBitmap)
{
- M_BITMAPHANDLERDATA->m_ok = TRUE;
- BITMAP bm;
- GetObject((HBITMAP) M_BITMAPHANDLERDATA->m_hBitmap, sizeof(BITMAP), (LPSTR) &bm);
- M_BITMAPHANDLERDATA->m_width = bm.bmWidth;
- M_BITMAPHANDLERDATA->m_height = bm.bmHeight;
- M_BITMAPHANDLERDATA->m_depth = bm.bmBitsPixel;
- return TRUE;
+ M_BITMAPHANDLERDATA->m_ok = TRUE;
+ BITMAP bm;
+ GetObject((HBITMAP) M_BITMAPHANDLERDATA->m_hBitmap, sizeof(BITMAP), (LPSTR) &bm);
+ M_BITMAPHANDLERDATA->m_width = bm.bmWidth;
+ M_BITMAPHANDLERDATA->m_height = bm.bmHeight;
+ M_BITMAPHANDLERDATA->m_depth = bm.bmBitsPixel;
+
+ if ( bitmap->IsKindOf(CLASSINFO(wxIcon)) )
+ {
+ }
+
+ return TRUE;
}
// it's probably not found
palette = NULL;
}
if (palette)
- M_BITMAPHANDLERDATA->m_bitmapPalette = *palette;
+ {
+ M_BITMAPHANDLERDATA->m_bitmapPalette = *palette;
+ delete palette;
+ }
return success;
#else
return FALSE;