X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/78d14f80e9a72041ede52c30d912ec5cef21b1b3..8b3fddc49326c0b6019cd7082218726aa17a5727:/src/xrc/xh_chckb.cpp?ds=sidebyside diff --git a/src/xrc/xh_chckb.cpp b/src/xrc/xh_chckb.cpp index 9974211104..35086f42b3 100644 --- a/src/xrc/xh_chckb.cpp +++ b/src/xrc/xh_chckb.cpp @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // Name: xh_chckb.cpp -// Purpose: XML resource for wxCheckBox +// Purpose: XRC resource for wxCheckBox // Author: Bob Mitchell // Created: 2000/03/21 // RCS-ID: $Id$ @@ -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"));