X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f25881804583790351480098b50f4ce1b924e697..012a01fc1ea0f4c870eaf66bb332617affa5abd0:/contrib/src/xrc/xh_scrol.cpp diff --git a/contrib/src/xrc/xh_scrol.cpp b/contrib/src/xrc/xh_scrol.cpp index 6e2dfb1b71..8077a49101 100644 --- a/contrib/src/xrc/xh_scrol.cpp +++ b/contrib/src/xrc/xh_scrol.cpp @@ -26,17 +26,14 @@ wxScrollBarXmlHandler::wxScrollBarXmlHandler() : wxXmlResourceHandler() { - ADD_STYLE( wxSB_HORIZONTAL ); - ADD_STYLE( wxSB_VERTICAL ); + XRC_ADD_STYLE(wxSB_HORIZONTAL); + XRC_ADD_STYLE(wxSB_VERTICAL); AddWindowStyles(); } wxObject *wxScrollBarXmlHandler::DoCreateResource() { - wxScrollBar *control = wxStaticCast(m_instance, wxScrollBar); - - if (!control) - control = new wxScrollBar; + XRC_MAKE_INSTANCE(control, wxScrollBar) control->Create(m_parentAsWindow, GetID(), @@ -48,21 +45,14 @@ wxObject *wxScrollBarXmlHandler::DoCreateResource() control->SetScrollbar(GetLong( wxT("value"), 0), GetLong( wxT("thumbsize"),1), GetLong( wxT("range"), 10), - GetLong( wxT("pagesize"),1) - ); - - + GetLong( wxT("pagesize"),1)); + SetupWindow(control); return control; } - - bool wxScrollBarXmlHandler::CanHandle(wxXmlNode *node) { return IsOfClass(node, wxT("wxScrollBar")); } - - -