X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/289532452089421ddadbd4726a8469511a19ab76..404b319a85dadd7decf7a5a5331020520031a41c:/src/msw/spinbutt.cpp?ds=sidebyside diff --git a/src/msw/spinbutt.cpp b/src/msw/spinbutt.cpp index 6d6f93e5b5..bea1fd143b 100644 --- a/src/msw/spinbutt.cpp +++ b/src/msw/spinbutt.cpp @@ -232,7 +232,7 @@ void wxSpinButton::SetRange(int minVal, int maxVal) } bool wxSpinButton::MSWOnScroll(int WXUNUSED(orientation), WXWORD wParam, - WXWORD pos, WXHWND control) + WXWORD WXUNUSED(pos), WXHWND control) { wxCHECK_MSG( control, false, wxT("scrolling what?") ); @@ -243,7 +243,9 @@ bool wxSpinButton::MSWOnScroll(int WXUNUSED(orientation), WXWORD wParam, } wxSpinEvent event(wxEVT_SCROLL_THUMBTRACK, m_windowId); - event.SetPosition((short)pos); // cast is important for negative values! + // We can't use 16 bit position provided in this message for spin buttons + // using 32 bit range. + event.SetPosition(GetValue()); event.SetEventObject(this); return HandleWindowEvent(event);