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:
Vadim Zeitlin
2002-09-25 17:53:47 +00:00
parent 1f6b7faabc
commit 66eb448aa2

View File

@@ -124,7 +124,7 @@ bool wxScrollBar::MSWOnScroll(int WXUNUSED(orientation), WXWORD wParam,
{ {
// current and max positions // current and max positions
int position, int position,
maxPos; maxPos, trackPos = pos;
#ifdef __WIN32__ #ifdef __WIN32__
// when we're dragging the scrollbar we can't use pos parameter because it // 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")); wxLogLastError(_T("GetScrollInfo"));
} }
pos = scrollInfo.nTrackPos; trackPos = scrollInfo.nTrackPos;
position = scrollInfo.nPos; position = scrollInfo.nPos;
maxPos = scrollInfo.nMax; maxPos = scrollInfo.nMax;
} }
@@ -201,12 +201,12 @@ bool wxScrollBar::MSWOnScroll(int WXUNUSED(orientation), WXWORD wParam,
break; break;
case SB_THUMBPOSITION: case SB_THUMBPOSITION:
nScrollInc = pos - position; nScrollInc = trackPos - position;
scrollEvent = wxEVT_SCROLL_THUMBRELEASE; scrollEvent = wxEVT_SCROLL_THUMBRELEASE;
break; break;
case SB_THUMBTRACK: case SB_THUMBTRACK:
nScrollInc = pos - position; nScrollInc = trackPos - position;
scrollEvent = wxEVT_SCROLL_THUMBTRACK; scrollEvent = wxEVT_SCROLL_THUMBTRACK;
break; break;