]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/spinctrl.cpp
PyCrust updates
[wxWidgets.git] / src / os2 / spinctrl.cpp
index 75a4b4589d3f77aa6cf61c2a15e0a207da3c1a50..516ee8f9cb1c504cb645962971ad2a585dca2b10 100644 (file)
@@ -129,6 +129,8 @@ bool wxSpinCtrl::Create(
 , const wxString&                   rsName
 )
 {
 , const wxString&                   rsName
 )
 {
+    SWP                             vSwp;
+
     if (vId == -1)
         m_windowId = NewControlId();
     else
     if (vId == -1)
         m_windowId = NewControlId();
     else
@@ -177,6 +179,9 @@ bool wxSpinCtrl::Create(
     if(pParent)
         pParent->AddChild((wxSpinButton *)this);
     SetFont(pParent->GetFont());
     if(pParent)
         pParent->AddChild((wxSpinButton *)this);
     SetFont(pParent->GetFont());
+    ::WinQueryWindowPos(m_hWnd, &vSwp);
+    SetXComp(vSwp.x);
+    SetYComp(vSwp.y);
     SetSize( rPos.x
             ,rPos.y
             ,rSize.x
     SetSize( rPos.x
             ,rPos.y
             ,rSize.x
@@ -262,12 +267,9 @@ void wxSpinCtrl::DoMoveWindow(
 
     if (pParent)
     {
 
     if (pParent)
     {
-        if (pParent->IsKindOf(CLASSINFO(wxFrame)))
-        {
-            nY = pParent->GetClientSize().y - (nY + nHeight);
-        }
-        else
-            nY = pParent->GetSize().y - (nY + nHeight);
+        int                         nOS2Height = GetOS2ParentHeight(pParent);
+
+        nY = nOS2Height - (nY + nHeight);
     }
     else
     {
     }
     else
     {