X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b5d6954b87d910969226ffade9714db7429211f3..b4e4abb51c35065b48ce5abe6b727aac498101dd:/contrib/src/xrc/xh_stbmp.cpp diff --git a/contrib/src/xrc/xh_stbmp.cpp b/contrib/src/xrc/xh_stbmp.cpp index 034fe3dd68..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,23 +32,21 @@ wxStaticBitmapXmlHandler::wxStaticBitmapXmlHandler() wxObject *wxStaticBitmapXmlHandler::DoCreateResource() { - wxStaticBitmap *bmp = new wxStaticBitmap(m_parentAsWindow, - GetID(), - GetBitmap(wxT("bitmap"), GetSize()), - GetPosition(), GetSize(), - GetStyle(), - GetName() - ); + XRC_MAKE_INSTANCE(bmp, wxStaticBitmap) + + bmp->Create(m_parentAsWindow, + GetID(), + GetBitmap(wxT("bitmap"), wxART_OTHER, GetSize()), + GetPosition(), GetSize(), + GetStyle(), + GetName()); + SetupWindow(bmp); return bmp; } - - bool wxStaticBitmapXmlHandler::CanHandle(wxXmlNode *node) { return IsOfClass(node, wxT("wxStaticBitmap")); } - -