X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f25881804583790351480098b50f4ce1b924e697..d1a6e2b7a103d761fbc15e0e9c1c20ab53a849d9:/contrib/src/xrc/xh_stbmp.cpp diff --git a/contrib/src/xrc/xh_stbmp.cpp b/contrib/src/xrc/xh_stbmp.cpp index 544b43de9f..04eb5096df 100644 --- a/contrib/src/xrc/xh_stbmp.cpp +++ b/contrib/src/xrc/xh_stbmp.cpp @@ -22,6 +22,8 @@ #include "wx/xrc/xh_stbmp.h" #include "wx/statbmp.h" +IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmapXmlHandler, wxXmlResourceHandler) + wxStaticBitmapXmlHandler::wxStaticBitmapXmlHandler() : wxXmlResourceHandler() { @@ -30,14 +32,11 @@ wxStaticBitmapXmlHandler::wxStaticBitmapXmlHandler() wxObject *wxStaticBitmapXmlHandler::DoCreateResource() { - wxStaticBitmap *bmp = wxStaticCast(m_instance, wxStaticBitmap); - - if (!bmp) - bmp = new wxStaticBitmap; + XRC_MAKE_INSTANCE(bmp, wxStaticBitmap) bmp->Create(m_parentAsWindow, GetID(), - GetBitmap(wxT("bitmap"), GetSize()), + GetBitmap(wxT("bitmap"), wxART_OTHER, GetSize()), GetPosition(), GetSize(), GetStyle(), GetName()); @@ -47,11 +46,7 @@ wxObject *wxStaticBitmapXmlHandler::DoCreateResource() return bmp; } - - bool wxStaticBitmapXmlHandler::CanHandle(wxXmlNode *node) { return IsOfClass(node, wxT("wxStaticBitmap")); } - -