]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/xrc/xh_chckb.cpp
removed implicit dependency on wxPNGHandler from wxGTK's wxBitmapDataObject
[wxWidgets.git] / contrib / src / xrc / xh_chckb.cpp
index 9974211104dab560bf0d3cba497bff4980207eed..35086f42b3718f1a78c2a9f8ce8ad13ed580d64f 100644 (file)
@@ -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"));