X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f25881804583790351480098b50f4ce1b924e697..012a01fc1ea0f4c870eaf66bb332617affa5abd0:/contrib/src/xrc/xh_chckb.cpp diff --git a/contrib/src/xrc/xh_chckb.cpp b/contrib/src/xrc/xh_chckb.cpp index 493c876f5c..35086f42b3 100644 --- a/contrib/src/xrc/xh_chckb.cpp +++ b/contrib/src/xrc/xh_chckb.cpp @@ -32,10 +32,7 @@ wxCheckBoxXmlHandler::wxCheckBoxXmlHandler() wxObject *wxCheckBoxXmlHandler::DoCreateResource() { - wxCheckBox *control = wxStaticCast(m_instance, wxCheckBox); - - if (!control) - control = new wxCheckBox; + XRC_MAKE_INSTANCE(control, wxCheckBox) control->Create(m_parentAsWindow, GetID(), @@ -45,14 +42,12 @@ wxObject *wxCheckBoxXmlHandler::DoCreateResource() wxDefaultValidator, GetName()); - control->SetValue( GetBool( wxT("checked"))); + control->SetValue(GetBool( wxT("checked"))); SetupWindow(control); return control; } - - bool wxCheckBoxXmlHandler::CanHandle(wxXmlNode *node) { return IsOfClass(node, wxT("wxCheckBox"));