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:
parent
1d8d0171bb
commit
ff42c0174d
|
@ -1102,6 +1102,18 @@ static void SCROLL_HandleScrollEvent( HWND hwnd, INT nBar, UINT msg, POINT pt)
|
||||||
break;
|
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)
|
if (msg == WM_LBUTTONUP)
|
||||||
{
|
{
|
||||||
hittest = SCROLL_trackHitTest;
|
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,
|
SendMessageA( hwndOwner, vertical ? WM_VSCROLL : WM_HSCROLL,
|
||||||
MAKEWPARAM( SB_THUMBPOSITION, val ), (LPARAM)hwndCtl );
|
MAKEWPARAM( SB_THUMBPOSITION, val ), (LPARAM)hwndCtl );
|
||||||
}
|
}
|
||||||
else
|
|
||||||
SendMessageA( hwndOwner, vertical ? WM_VSCROLL : WM_HSCROLL,
|
SendMessageA( hwndOwner, vertical ? WM_VSCROLL : WM_HSCROLL,
|
||||||
SB_ENDSCROLL, (LPARAM)hwndCtl );
|
SB_ENDSCROLL, (LPARAM)hwndCtl );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue