- const wxIcon& GetIcon() const
- { wxASSERT( m_isIcon ); return *(wxIcon *)m_image; }
- const wxBitmap& GetBitmap() const
- { wxASSERT( !m_isIcon ); return *(wxBitmap *)m_image; }
+ wxIcon GetIcon() const
+ {
+ wxASSERT_MSG( m_isIcon, _T("no icon in this wxStaticBitmap") );
+
+ return *(wxIcon *)m_image;
+ }