}
bool wxSpinButton::MSWOnScroll(int WXUNUSED(orientation), WXWORD wParam,
- WXWORD pos, WXHWND control)
+ WXWORD WXUNUSED(pos), WXHWND control)
{
wxCHECK_MSG( control, false, wxT("scrolling what?") );
}
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);