X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/37e2cb08cd1910ec5a14b38f0addfc6e2e8e172e..cf1a9b45c7b70f217d3cc282ab77df8feaadcdeb:/src/mac/carbon/statbmp.cpp diff --git a/src/mac/carbon/statbmp.cpp b/src/mac/carbon/statbmp.cpp index ce1e5d1ec8..f85c66b456 100644 --- a/src/mac/carbon/statbmp.cpp +++ b/src/mac/carbon/statbmp.cpp @@ -14,8 +14,11 @@ #endif #include "wx/statbmp.h" +#include "wx/dcclient.h" +#if !USE_SHARED_LIBRARY IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmap, wxControl) +#endif /* * wxStaticBitmap @@ -28,11 +31,12 @@ END_EVENT_TABLE() bool wxStaticBitmap::Create(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap, const wxPoint& pos, - const wxSize& size, + const wxSize& s, long style, const wxString& name) { SetName(name); + wxSize size = s ; m_backgroundColour = parent->GetBackgroundColour() ; m_foregroundColour = parent->GetForegroundColour() ; @@ -47,9 +51,8 @@ bool wxStaticBitmap::Create(wxWindow *parent, wxWindowID id, m_windowStyle = style; bool ret = wxControl::Create( parent, id, pos, size, style , wxDefaultValidator , name ); + SetSizeOrDefault( size ) ; - SetSizeOrDefault() ; - return ret; } @@ -68,7 +71,7 @@ void wxStaticBitmap::OnPaint( wxPaintEvent &event ) wxPaintDC dc(this); PrepareDC(dc); dc.SetPalette( *m_messageBitmap.GetPalette() ) ; - dc.DrawBitmap( m_messageBitmap , 0 , 0 ) ; + dc.DrawBitmap( m_messageBitmap , 0 , 0 , TRUE ) ; } wxSize wxStaticBitmap::DoGetBestSize() const