X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ad81651f00edc6f489d9b6a0839d316a964fd521..f87a708b143329a5b7f4e18e88967853c553082d:/src/mac/carbon/statbmp.cpp diff --git a/src/mac/carbon/statbmp.cpp b/src/mac/carbon/statbmp.cpp index 8bd5fecb71..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() ; @@ -46,10 +50,9 @@ bool wxStaticBitmap::Create(wxWindow *parent, wxWindowID id, m_windowStyle = style; - bool ret = wxControl::Create( parent, id, pos, size, style , name ); + 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