fix scrollbars for >16-bit values under Windows

svn: r14603
This commit is contained in:
Matthew Flatt 2009-04-24 21:49:16 +00:00
parent 4bc8e35d39
commit afd8b0c2fd

View File

@ -2404,6 +2404,18 @@ void wxSubWnd::OnHScroll( WORD wParam, WORD pos, HWND control)
case SB_THUMBTRACK:
event->moveType = wxEVENT_TYPE_SCROLL_THUMBTRACK;
{
/* Work-around for 16-bit limit on incoming `pos' */
SCROLLINFO si;
ZeroMemory(&si, sizeof(si));
si.cbSize = sizeof(si);
si.fMask = SIF_TRACKPOS;
if (GetScrollInfo(hwnd, SB_HORZ, &si)) {
pos = si.nTrackPos;
event->pos = pos;
}
}
break;
default: