+ BITMAP bm;
+ if ( !::GetObject(GetHbitmapOf(*bitmap), sizeof(BITMAP), (LPSTR) &bm) )
+ {
+ wxLogLastError(wxT("GetObject(HBITMAP)"));
+ }
+
+ bitmap->SetWidth(bm.bmWidth);
+ bitmap->SetHeight(bm.bmHeight);
+ bitmap->SetDepth(bm.bmBitsPixel);
+
+ // use 0xc0c0c0 as transparent colour by default
+ bitmap->SetMask(new wxMask(*bitmap, *wxLIGHT_GREY));
+
+ return true;