X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b4715d08bf50050ae00df367d0c95666ca22d088..b7d3a622aa58729f92941c2b6710c5481b16f19e:/src/generic/statbmpg.cpp diff --git a/src/generic/statbmpg.cpp b/src/generic/statbmpg.cpp index 9927e10606..735c0b9d32 100644 --- a/src/generic/statbmpg.cpp +++ b/src/generic/statbmpg.cpp @@ -18,8 +18,6 @@ #include "wx/generic/statbmpg.h" -IMPLEMENT_DYNAMIC_CLASS(wxGenericStaticBitmap, wxStaticBitmapBase) - bool wxGenericStaticBitmap::Create(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap, const wxPoint& pos, const wxSize& size, @@ -36,10 +34,16 @@ bool wxGenericStaticBitmap::Create(wxWindow *parent, wxWindowID id, void wxGenericStaticBitmap::OnPaint(wxPaintEvent& WXUNUSED(event)) { wxPaintDC dc(this); - PrepareDC(dc); - if (m_bitmap.Ok()) + if (m_bitmap.IsOk()) dc.DrawBitmap(m_bitmap, 0, 0, true); } +// under OSX_cocoa is a define, avoid duplicate info +#ifndef wxGenericStaticBitmap + +IMPLEMENT_DYNAMIC_CLASS(wxGenericStaticBitmap, wxStaticBitmapBase) + +#endif + #endif // wxUSE_STATBMP