wxImage img = decoder.ReadData(data);
wxCHECK_MSG( img.Ok(), FALSE, wxT("invalid bitmap data") )
- *this = img.ConvertToBitmap();
+ *this = wxBitmap(img);
return TRUE;
#else
return FALSE;
bool ok = TRUE;
+ // SelectObject() will fail
+ wxASSERT_MSG( !bitmap.GetSelectedInto(),
+ _T("bitmap can't be selected in another DC") );
+
HGDIOBJ hbmpSrcOld = ::SelectObject(srcDC, GetHbitmapOf(bitmap));
if ( !hbmpSrcOld )
{