really fixed handling 32 bit scrollbar positions while dragging the thumb (thanks to Jonathan Marsden)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17380 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -124,7 +124,7 @@ bool wxScrollBar::MSWOnScroll(int WXUNUSED(orientation), WXWORD wParam,
|
||||
{
|
||||
// current and max positions
|
||||
int position,
|
||||
maxPos;
|
||||
maxPos, trackPos = pos;
|
||||
|
||||
#ifdef __WIN32__
|
||||
// when we're dragging the scrollbar we can't use pos parameter because it
|
||||
@@ -145,7 +145,7 @@ bool wxScrollBar::MSWOnScroll(int WXUNUSED(orientation), WXWORD wParam,
|
||||
wxLogLastError(_T("GetScrollInfo"));
|
||||
}
|
||||
|
||||
pos = scrollInfo.nTrackPos;
|
||||
trackPos = scrollInfo.nTrackPos;
|
||||
position = scrollInfo.nPos;
|
||||
maxPos = scrollInfo.nMax;
|
||||
}
|
||||
@@ -201,12 +201,12 @@ bool wxScrollBar::MSWOnScroll(int WXUNUSED(orientation), WXWORD wParam,
|
||||
break;
|
||||
|
||||
case SB_THUMBPOSITION:
|
||||
nScrollInc = pos - position;
|
||||
nScrollInc = trackPos - position;
|
||||
scrollEvent = wxEVT_SCROLL_THUMBRELEASE;
|
||||
break;
|
||||
|
||||
case SB_THUMBTRACK:
|
||||
nScrollInc = pos - position;
|
||||
nScrollInc = trackPos - position;
|
||||
scrollEvent = wxEVT_SCROLL_THUMBTRACK;
|
||||
break;
|
||||
|
||||
|
Reference in New Issue
Block a user