On mouse down in thumb, issue SB_THUMBTRACK with current position.

On mouse up in thumb, issue SB_THUMBPOSITION followed by
SB_ENDSCROLL.
This commit is contained in:
Duane Clark 2002-08-03 00:13:48 +00:00 committed by Alexandre Julliard
parent 1d8d0171bb
commit ff42c0174d

View file

@ -1102,6 +1102,18 @@ static void SCROLL_HandleScrollEvent( HWND hwnd, INT nBar, UINT msg, POINT pt)
break;
}
if (msg == WM_LBUTTONDOWN)
{
if (hittest == SCROLL_THUMB)
{
UINT val = SCROLL_GetThumbVal( infoPtr, &rect, vertical,
trackThumbPos + lastMousePos - lastClickPos );
SendMessageA( hwndOwner, vertical ? WM_VSCROLL : WM_HSCROLL,
MAKEWPARAM( SB_THUMBTRACK, val ), (LPARAM)hwndCtl );
}
}
if (msg == WM_LBUTTONUP)
{
hittest = SCROLL_trackHitTest;
@ -1114,7 +1126,6 @@ static void SCROLL_HandleScrollEvent( HWND hwnd, INT nBar, UINT msg, POINT pt)
SendMessageA( hwndOwner, vertical ? WM_VSCROLL : WM_HSCROLL,
MAKEWPARAM( SB_THUMBPOSITION, val ), (LPARAM)hwndCtl );
}
else
SendMessageA( hwndOwner, vertical ? WM_VSCROLL : WM_HSCROLL,
SB_ENDSCROLL, (LPARAM)hwndCtl );
}