+ // copying a bitmap is a cheap operation
+ return new wxIcon( (const wxIcon&)bitmap );
+}
+
+#endif
+
+bool wxStaticBitmap::Create(wxWindow *parent,
+ wxWindowID id,
+ const wxGDIImage& bitmap,
+ const wxPoint& pos,
+ const wxSize& size,
+ long style,
+ const wxString& name)
+{
+ if ( !CreateControl(parent, id, pos, size, style, wxDefaultValidator, name) )
+ return FALSE;
+
+ // we may have either bitmap or icon: if a bitmap with mask is passed, we
+ // will transform it to an icon ourselves because otherwise the mask will
+ // be ignored by Windows
+ wxGDIImage *image = (wxGDIImage *)NULL;
+ m_isIcon = bitmap.IsKindOf(CLASSINFO(wxIcon));
+
+#ifdef __WIN16__
+ wxASSERT_MSG( !m_isIcon, "Icons are not supported in wxStaticBitmap under WIN16." );
+ image = &bitmap;
+#else // Win32
+ image = ConvertImage( bitmap );
+ m_isIcon = image->IsKindOf( CLASSINFO(wxIcon) );
+#endif // Win16/32
+
+ // create the native control
+ if ( !MSWCreateControl(