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"));