+bool wxSpinCtrl::Show(bool show)
+{
+ if ( !wxControl::Show(show) )
+ {
+ return FALSE;
+ }
+
+ ::ShowWindow((HWND)m_hwndBuddy, show ? SW_SHOW : SW_HIDE);
+
+ return TRUE;
+}
+
+bool wxSpinCtrl::Enable(bool enable)
+{
+ if ( !wxControl::Enable(enable) )
+ {
+ return FALSE;
+ }
+
+ ::EnableWindow((HWND)m_hwndBuddy, enable);
+
+ return TRUE;
+}
+
+void wxSpinCtrl::SetFocus()
+{
+ ::SetFocus((HWND)m_hwndBuddy);
+}
+
+// ----------------------------------------------------------------------------
+// event processing
+// ----------------------------------------------------------------------------
+
+void wxSpinCtrl::OnSpinChange(wxSpinEvent& eventSpin)
+{
+ wxCommandEvent event(wxEVT_COMMAND_SPINCTRL_UPDATED, GetId());
+ event.SetEventObject(this);
+ event.SetInt(eventSpin.GetPosition());
+
+ (void)GetEventHandler()->ProcessEvent(event);
+
+ if ( eventSpin.GetSkipped() )
+ {
+ event.Skip();
+ }
+}
+