- if ( (wxSscanf(m_spinctrl->GetValue(), wxT("%lu"), &m_value) != 1) ||
- (m_value < m_min) || (m_value > m_max) )
+#if !wxUSE_SPINCTRL
+ wxString tmp = m_spinctrl->GetValue();
+ if ( wxSscanf(tmp, _T("%ld"), &m_value) != 1 )
+ m_value = -1;
+ else
+#else
+ m_value = m_spinctrl->GetValue();
+#endif
+ if ( m_value < m_min || m_value > m_max )