- wxBitmap m_messageBitmap;
-
- virtual void DoSetSize(int x, int y,
- int width, int height,
- int sizeFlags = wxSIZE_AUTO);
+ virtual wxSize DoGetBestClientSize() const;
+
+ // ctor/dtor helpers
+ void Init() { m_isIcon = true; m_image = NULL; m_currentHandle = 0; }
+ void Free();
+
+ // true if icon/bitmap is valid
+ bool ImageIsOk() const;
+
+ void SetImage(const wxGDIImage* image);
+ void SetImageNoCopy( wxGDIImage* image );
+
+#ifndef __WXWINCE__
+ // draw the bitmap ourselves here if the OS can't do it correctly (if it
+ // can we leave it to it)
+ void DoPaintManually(wxPaintEvent& event);
+#endif // !__WXWINCE__
+
+ void WXHandleSize(wxSizeEvent& event);
+
+ // we can have either an icon or a bitmap
+ bool m_isIcon;
+ wxGDIImage *m_image;
+
+ // handle used in last call to STM_SETIMAGE
+ WXHANDLE m_currentHandle;
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxStaticBitmap)
+ wxDECLARE_EVENT_TABLE();
+ wxDECLARE_NO_COPY_CLASS(wxStaticBitmap);