]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/spinctrl.cpp
/Wp64 warnings fixes (mostly simply use wxUIntToPtr/wxPtrToUInt() instead of C casts)
[wxWidgets.git] / src / msw / spinctrl.cpp
index 1b9910d66f996edadb41cd6737e1beccc0ae6df6..2a1826c45a88e543aa01c0912f4baeab5824d827 100644 (file)
@@ -207,7 +207,7 @@ bool wxSpinCtrl::ProcessTextCommand(WXWORD cmd, WXWORD WXUNUSED(id))
         wxString val = wxGetWindowText(m_hwndBuddy);
         event.SetString(val);
         event.SetInt(GetValue());
-        return GetEventHandler()->ProcessEvent(event);
+        return HandleWindowEvent(event);
     }
 
     // not processed
@@ -225,7 +225,7 @@ void wxSpinCtrl::OnChar(wxKeyEvent& event)
                 wxString val = wxGetWindowText(m_hwndBuddy);
                 event.SetString(val);
                 event.SetInt(GetValue());
-                if ( GetEventHandler()->ProcessEvent(event) )
+                if ( HandleWindowEvent(event) )
                     return;
                 break;
             }
@@ -241,7 +241,7 @@ void wxSpinCtrl::OnChar(wxKeyEvent& event)
                 eventNav.SetWindowChange(event.ControlDown());
                 eventNav.SetEventObject(this);
 
-                if ( GetParent()->GetEventHandler()->ProcessEvent(eventNav) )
+                if ( GetParent()->HandleWindowEvent(eventNav) )
                     return;
             }
             break;
@@ -571,7 +571,7 @@ void wxSpinCtrl::SendSpinUpdate(int value)
     event.SetEventObject(this);
     event.SetInt(value);
 
-    (void)GetEventHandler()->ProcessEvent(event);
+    (void)HandleWindowEvent(event);
 
     m_oldValue = value;
 }
@@ -643,6 +643,19 @@ void wxSpinCtrl::DoGetSize(int *x, int *y) const
         *y = ctrlrect.bottom - ctrlrect.top;
 }
 
+void wxSpinCtrl::DoGetClientSize(int *x, int *y) const
+{
+    RECT spinrect = wxGetClientRect(GetHwnd());
+    RECT textrect = wxGetClientRect(GetBuddyHwnd());
+    RECT ctrlrect;
+    UnionRect(&ctrlrect,&textrect, &spinrect);
+
+    if ( x )
+        *x = ctrlrect.right - ctrlrect.left;
+    if ( y )
+        *y = ctrlrect.bottom - ctrlrect.top;
+}
+
 void wxSpinCtrl::DoGetPosition(int *x, int *y) const
 {
     // hack: pretend that our HWND is the text control just for a moment