]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/xml/xh_spin.cpp
Fixed buffer overrun in call to wxStripMenuCodes()
[wxWidgets.git] / contrib / src / xml / xh_spin.cpp
index 320813c999d0ca7382fe8933f364f9b1b4cbfb7a..24f046fd165e8f2178fb7678dccd40d221bc2c80 100644 (file)
@@ -31,6 +31,7 @@ wxSpinButtonXmlHandler::wxSpinButtonXmlHandler()
     ADD_STYLE( wxSP_VERTICAL );
     ADD_STYLE( wxSP_ARROW_KEYS );
     ADD_STYLE( wxSP_WRAP );
+    AddWindowStyles();
 }
 
 wxObject *wxSpinButtonXmlHandler::DoCreateResource()
@@ -74,7 +75,7 @@ wxObject *wxSpinCtrlXmlHandler::DoCreateResource()
 { 
     wxSpinCtrl *control = new wxSpinCtrl(m_ParentAsWindow,
                                     GetID(),
-                                    GetText(_T("label")),
+                                    GetText(_T("value")),
                                     GetPosition(), GetSize(),
                                     GetStyle( _T("style"), wxSP_ARROW_KEYS ),
                                     GetLong( _T("min"), wxSP_DEFAULT_MIN),
@@ -92,7 +93,7 @@ wxObject *wxSpinCtrlXmlHandler::DoCreateResource()
 
 bool wxSpinCtrlXmlHandler::CanHandle(wxXmlNode *node)
 {
-    return node->GetName() == _T("spinctrl");
+    return IsOfClass(node, _T("wxSpinCtrl"));
 }
 
 #endif // wxUSE_SPINCTRL