+#ifndef wxHAS_NATIVE_SPINCTRL
+
+//-----------------------------------------------------------------------------
+// wxSpinCtrl
+//-----------------------------------------------------------------------------
+
+IMPLEMENT_DYNAMIC_CLASS(wxSpinCtrl, wxSpinCtrlGenericBase)
+
+void wxSpinCtrl::DoSendEvent()
+{
+ wxSpinEvent event( wxEVT_COMMAND_SPINCTRL_UPDATED, GetId());
+ event.SetEventObject( this );
+ event.SetPosition((int)(m_value + 0.5)); // FIXME should be SetValue
+ event.SetString(m_textCtrl->GetValue());
+ GetEventHandler()->ProcessEvent( event );
+}
+
+#endif // !wxHAS_NATIVE_SPINCTRL
+
+//-----------------------------------------------------------------------------
+// wxSpinCtrlDouble
+//-----------------------------------------------------------------------------
+
+IMPLEMENT_DYNAMIC_CLASS(wxSpinCtrlDouble, wxSpinCtrlGenericBase)
+
+void wxSpinCtrlDouble::DoSendEvent()
+{
+ wxSpinDoubleEvent event( wxEVT_COMMAND_SPINCTRLDOUBLE_UPDATED, GetId());
+ event.SetEventObject( this );
+ event.SetValue(m_value);
+ event.SetString(m_textCtrl->GetValue());
+ GetEventHandler()->ProcessEvent( event );
+}
+
+void wxSpinCtrlDouble::SetDigits(unsigned digits)
+{
+ wxCHECK_RET( digits <= 20, "too many digits for wxSpinCtrlDouble" );
+
+ if ( digits == m_digits )
+ return;
+
+ m_digits = digits;
+
+ m_format.Printf(wxT("%%0.%ulf"), digits);
+
+ DoSetValue(m_value);
+}
+
+#endif // wxUSE_SPINBTN
+