X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b3260bce473ab247edd8ca1d3aee4eb648b4b97e..27813df1f79323884ce5e3ec9a730f5d3da03f95:/src/os2/spinctrl.cpp diff --git a/src/os2/spinctrl.cpp b/src/os2/spinctrl.cpp index 8c2735901e..d526cfa43f 100644 --- a/src/os2/spinctrl.cpp +++ b/src/os2/spinctrl.cpp @@ -337,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 ( @@ -488,4 +488,20 @@ bool wxSpinCtrl::Show( return TRUE; } // end of wxSpinCtrl::Show -#endif //wxUSE_SPINBTN \ No newline at end of file +void wxSpinCtrl::SetSelection ( + long lFrom +, long lTo +) +{ + // + // If from and to are both -1, it means (in wxWindows) that all text should + // be selected - translate into Windows convention + // + if ((lFrom == -1) && (lTo == -1)) + { + lFrom = 0; + } + ::WinSendMsg(m_hWnd, EM_SETSEL, MPFROM2SHORT((USHORT)lFrom, (USHORT)lTo), (MPARAM)0); +} // end of wxSpinCtrl::SetSelection + +#endif //wxUSE_SPINBTN