#if wxUSE_CHECKBOX
+IMPLEMENT_DYNAMIC_CLASS(wxCheckBoxXmlHandler, wxXmlResourceHandler)
+
wxCheckBoxXmlHandler::wxCheckBoxXmlHandler()
: wxXmlResourceHandler()
{
wxObject *wxCheckBoxXmlHandler::DoCreateResource()
{
- wxCheckBox *control = wxStaticCast(m_instance, wxCheckBox);
-
- if (!control)
- control = new wxCheckBox;
+ XRC_MAKE_INSTANCE(control, wxCheckBox)
control->Create(m_parentAsWindow,
GetID(),
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"));