]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/xrc/xh_stbox.cpp
Applied patch [ 809066 ] Cleanup for text2rtf
[wxWidgets.git] / contrib / src / xrc / xh_stbox.cpp
index 977de263d4d526c4e756b9e68f52845063fdae05..cc357908c9b6843cf7b6d7d0df79dda60a56975b 100644 (file)
@@ -22,6 +22,8 @@
 #include "wx/xrc/xh_stbox.h"
 #include "wx/statbox.h"
 
 #include "wx/xrc/xh_stbox.h"
 #include "wx/statbox.h"
 
+IMPLEMENT_DYNAMIC_CLASS(wxStaticBoxXmlHandler, wxXmlResourceHandler)
+
 wxStaticBoxXmlHandler::wxStaticBoxXmlHandler() 
 : wxXmlResourceHandler() 
 {
 wxStaticBoxXmlHandler::wxStaticBoxXmlHandler() 
 : wxXmlResourceHandler() 
 {
@@ -30,10 +32,7 @@ wxStaticBoxXmlHandler::wxStaticBoxXmlHandler()
 
 wxObject *wxStaticBoxXmlHandler::DoCreateResource()
 { 
 
 wxObject *wxStaticBoxXmlHandler::DoCreateResource()
 { 
-    wxStaticBox *box = wxStaticCast(m_instance, wxStaticBox);
-
-    if (!box)
-       box = new wxStaticBox;
+    XRC_MAKE_INSTANCE(box, wxStaticBox)
 
     box->Create(m_parentAsWindow,
                 GetID(),
 
     box->Create(m_parentAsWindow,
                 GetID(),
@@ -47,11 +46,7 @@ wxObject *wxStaticBoxXmlHandler::DoCreateResource()
     return box;
 }
 
     return box;
 }
 
-
-
 bool wxStaticBoxXmlHandler::CanHandle(wxXmlNode *node)
 {
     return IsOfClass(node, wxT("wxStaticBox"));
 }
 bool wxStaticBoxXmlHandler::CanHandle(wxXmlNode *node)
 {
     return IsOfClass(node, wxT("wxStaticBox"));
 }
-
-