+#ifdef __WIN16__
+ wxASSERT_MSG( !m_isIcon, "Icons are not supported in wxStaticBitmap under WIN16." );
+#endif
+
+#ifndef __WIN16__
+ if ( !m_isIcon )
+ {
+ const wxBitmap& bmp = (const wxBitmap&)bitmap;
+ wxMask *mask = bmp.GetMask();
+ if ( mask && mask->GetMaskBitmap() )
+ {
+ icon = new wxIcon;
+ icon->CopyFromBitmap(bmp);
+
+ m_isIcon = TRUE;
+ }
+ }
+#endif
+