]> git.saurik.com Git - wxWidgets.git/blobdiff - src/xrc/xh_stlin.cpp
unapplied part of Dimitri's patch at his request
[wxWidgets.git] / src / xrc / xh_stlin.cpp
index 72955efbaee59b5bf1730ed6ca9ae98100af0c3e..340dc4e945799beb5cd7bf03c6a318d4c8f5995b 100644 (file)
 wxStaticLineXmlHandler::wxStaticLineXmlHandler() 
 : wxXmlResourceHandler() 
 {
-    ADD_STYLE(wxLI_HORIZONTAL);
-    ADD_STYLE(wxLI_VERTICAL);
+    XRC_ADD_STYLE(wxLI_HORIZONTAL);
+    XRC_ADD_STYLE(wxLI_VERTICAL);
     AddWindowStyles();
 }
 
 wxObject *wxStaticLineXmlHandler::DoCreateResource()
 { 
-    wxStaticLine *line = new wxStaticLine(m_parentAsWindow,
-                                    GetID(),
-                                    GetPosition(), GetSize(),
-                                    GetStyle(wxT("style"), wxLI_HORIZONTAL),
-                                    GetName()
-                                    );
+    XRC_MAKE_INSTANCE(line, wxStaticLine)
+
+    line->Create(m_parentAsWindow,
+                GetID(),
+                GetPosition(), GetSize(),
+                GetStyle(wxT("style"), wxLI_HORIZONTAL),
+                GetName());
+
     SetupWindow(line);
     
     return line;
 }
 
-
-
 bool wxStaticLineXmlHandler::CanHandle(wxXmlNode *node)
 {
     return IsOfClass(node, wxT("wxStaticLine"));