+ return *(wxBitmap *)m_image;
+ }
+
+ // implementation only from now on
+ // -------------------------------
+
+ // implement base class virtuals
+ virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
+
+protected:
+ virtual wxBorder GetDefaultBorder() const;
+ virtual wxSize DoGetBestSize() const;
+ virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
+
+ // ctor/dtor helpers
+ void Init() { m_isIcon = true; m_image = NULL; }
+ void Free();
+
+ // true if icon/bitmap is valid
+ bool ImageIsOk() const;
+
+ void SetImage(const wxGDIImage* image);
+ void SetImageNoCopy( wxGDIImage* image );
+
+ // we can have either an icon or a bitmap
+ bool m_isIcon;
+ wxGDIImage *m_image;
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxStaticBitmap)
+ DECLARE_NO_COPY_CLASS(wxStaticBitmap)