long style,
const wxString& name)
{
- m_messageBitmap = bitmap;
+ Init();
+
SetName(name);
if (parent) parent->AddChild(this);
+ m_backgroundColour = parent->GetBackgroundColour() ;
+ m_foregroundColour = parent->GetForegroundColour() ;
+
if ( id == -1 )
m_windowId = (int)NewControlId();
else
m_windowStyle = style;
+ int x = pos.x;
+ int y = pos.y;
+ int width = size.x;
+ int height = size.y;
+
+ m_windowStyle = style;
+
+ m_isIcon = bitmap.IsKindOf(CLASSINFO(wxIcon));
+
// TODO: create static bitmap control
+ wxCHECK_MSG( m_hWnd, FALSE, wxT("Failed to create static bitmap") );
+
+ SetBitmap(bitmap);
+
+ // Subclass again for purposes of dialog editing mode
+ SubclassWin(m_hWnd);
+
+ SetFont(GetParent()->GetFont());
+
+ SetSize(x, y, width, height);
+
return FALSE;
}
m_image.icon = NULL;
}
-wxSize wxStaticBitmap::DoGetBestSize()
+wxSize wxStaticBitmap::DoGetBestSize() const
{
// reuse the current size (as wxWindow does) instead of using some
// arbitrary default size (as wxControl, our immediate base class, does)