- m_spinctrl = new wxTextCtrl(this, -1, valStr, wxDefaultPosition, wxSize( 140, -1 ) );
+ m_spinctrl = new wxSpinCtrl(this, -1, valStr, wxDefaultPosition, wxSize( 140, -1 ) );
+#if !defined(__WIN16__) && wxUSE_SPINCTRL
+ m_spinctrl->SetRange((int)m_min, (int)m_max);
+#endif