X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f25881804583790351480098b50f4ce1b924e697..31478355f8348d7dfb1c647919b62b224acfa8a0:/contrib/src/xrc/xh_stbox.cpp?ds=inline diff --git a/contrib/src/xrc/xh_stbox.cpp b/contrib/src/xrc/xh_stbox.cpp index 977de263d4..cc357908c9 100644 --- a/contrib/src/xrc/xh_stbox.cpp +++ b/contrib/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")); } - -