]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/spinctrl.cpp
getting rid of warnings
[wxWidgets.git] / src / os2 / spinctrl.cpp
index 6804a3ab94f9b78e987d1a799eb601c3d5f7a0e1..2fa04e704975bcbb73591d6ac5d9f1d592d9b038 100644 (file)
@@ -151,15 +151,6 @@ bool wxSpinCtrl::Create(
     if (m_windowStyle & wxCLIP_SIBLINGS )
         lSstyle |= WS_CLIPSIBLINGS;
 
-    //
-    // If the parent is a scrolled window the controls must
-    // have this style or they will overlap the scrollbars
-    //
-    if (pParent)
-        if (pParent->IsKindOf(CLASSINFO(wxScrolledWindow)) ||
-            pParent->IsKindOf(CLASSINFO(wxGenericScrolledWindow)))
-            lSstyle |= WS_CLIPSIBLINGS;
-
     SPBCDATA                        vCtrlData;
 
     vCtrlData.cbSize = sizeof(SPBCDATA);
@@ -187,7 +178,12 @@ bool wxSpinCtrl::Create(
     m_hWndBuddy = m_hWnd; // One in the same for OS/2
     if(pParent)
         pParent->AddChild((wxSpinButton *)this);
-    SetFont(pParent->GetFont());
+    wxFont*                          pTextFont = new wxFont( 10
+                                                            ,wxMODERN
+                                                            ,wxNORMAL
+                                                            ,wxNORMAL
+                                                           );
+    SetFont(*pTextFont);
     ::WinQueryWindowPos(m_hWnd, &vSwp);
     SetXComp(vSwp.x);
     SetYComp(vSwp.y);
@@ -209,6 +205,7 @@ bool wxSpinCtrl::Create(
     ::WinSetWindowULong(GetHwnd(), QWL_USER, (LONG)this);
     fnWndProcSpinCtrl = (WXFARPROC)::WinSubclassWindow(m_hWnd, (PFNWP)wxSpinCtrlWndProc);
     m_svAllSpins.Add(this);
+    delete pTextFont;
     return TRUE;
 } // end of wxSpinCtrl::Create
 
@@ -340,8 +337,8 @@ int wxSpinCtrl::GetValue() const
                                ,SPBQ_UPDATEIFVALID
                               )
                 );
-    lVal - atol(zVal);
-    return lVal;
+    lVal = atol(zVal);
+    return (int)lVal;
 } // end of wxSpinCtrl::GetValue
 
 void wxSpinCtrl::OnChar (
@@ -491,4 +488,4 @@ bool wxSpinCtrl::Show(
     return TRUE;
 } // end of wxSpinCtrl::Show
 
-#endif //wxUSE_SPINBTN
\ No newline at end of file
+#endif //wxUSE_SPINBTN