X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b5d6954b87d910969226ffade9714db7429211f3..cdb105516c7934613e22c4ae2b0936ea77ad17ca:/src/xrc/xh_chckb.cpp diff --git a/src/xrc/xh_chckb.cpp b/src/xrc/xh_chckb.cpp index 9bd2eb99ac..35086f42b3 100644 --- a/src/xrc/xh_chckb.cpp +++ b/src/xrc/xh_chckb.cpp @@ -32,23 +32,22 @@ wxCheckBoxXmlHandler::wxCheckBoxXmlHandler() wxObject *wxCheckBoxXmlHandler::DoCreateResource() { - wxCheckBox *control = new wxCheckBox(m_parentAsWindow, - GetID(), - GetText(wxT("label")), - GetPosition(), GetSize(), - GetStyle(), - wxDefaultValidator, - GetName() - ); - - control->SetValue( GetBool( wxT("checked"))); + XRC_MAKE_INSTANCE(control, wxCheckBox) + + control->Create(m_parentAsWindow, + GetID(), + GetText(wxT("label")), + GetPosition(), GetSize(), + GetStyle(), + wxDefaultValidator, + GetName()); + + control->SetValue(GetBool( wxT("checked"))); SetupWindow(control); return control; } - - bool wxCheckBoxXmlHandler::CanHandle(wxXmlNode *node) { return IsOfClass(node, wxT("wxCheckBox"));