X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f25881804583790351480098b50f4ce1b924e697..bfdc04a9bb95e6865570d59192718052b6229221:/src/xrc/xh_stbox.cpp?ds=inline diff --git a/src/xrc/xh_stbox.cpp b/src/xrc/xh_stbox.cpp index 977de263d4..cc357908c9 100644 --- a/src/xrc/xh_stbox.cpp +++ b/src/xrc/xh_stbox.cpp @@ -22,6 +22,8 @@ #include "wx/xrc/xh_stbox.h" #include "wx/statbox.h" +IMPLEMENT_DYNAMIC_CLASS(wxStaticBoxXmlHandler, wxXmlResourceHandler) + wxStaticBoxXmlHandler::wxStaticBoxXmlHandler() : wxXmlResourceHandler() { @@ -30,10 +32,7 @@ wxStaticBoxXmlHandler::wxStaticBoxXmlHandler() wxObject *wxStaticBoxXmlHandler::DoCreateResource() { - wxStaticBox *box = wxStaticCast(m_instance, wxStaticBox); - - if (!box) - box = new wxStaticBox; + XRC_MAKE_INSTANCE(box, wxStaticBox) box->Create(m_parentAsWindow, GetID(), @@ -47,11 +46,7 @@ wxObject *wxStaticBoxXmlHandler::DoCreateResource() return box; } - - bool wxStaticBoxXmlHandler::CanHandle(wxXmlNode *node) { return IsOfClass(node, wxT("wxStaticBox")); } - -