Commit e04e857a authored by Zhiyi Zhang's avatar Zhiyi Zhang Committed by Alexandre Julliard

user32: Call SCROLL_DrawScrollBar() to draw tracks in SCROLL_HandleScrollEvent().

parent c3d8b39e
...@@ -614,6 +614,13 @@ void SCROLL_DrawScrollBar( HWND hwnd, HDC hdc, INT nBar, enum SCROLL_HITTEST hit ...@@ -614,6 +614,13 @@ void SCROLL_DrawScrollBar( HWND hwnd, HDC hdc, INT nBar, enum SCROLL_HITTEST hit
SCROLL_DrawMovingThumb( hdc, &rect, vertical, arrowSize, thumbSize ); SCROLL_DrawMovingThumb( hdc, &rect, vertical, arrowSize, thumbSize );
SCROLL_MovingThumb = FALSE; SCROLL_MovingThumb = FALSE;
} }
else if (vertical == SCROLL_trackVertical && GetCapture() == hwnd)
{
SCROLL_DrawInterior( hwnd, hdc, nBar, &rect, arrowSize, thumbSize, thumbPos,
infoPtr->flags, vertical,
hit_test == SCROLL_trackHitTest && hit_test == SCROLL_TOP_RECT,
hit_test == SCROLL_trackHitTest && hit_test == SCROLL_BOTTOM_RECT );
}
else else
{ {
SCROLL_DrawInterior( hwnd, hdc, nBar, &rect, arrowSize, thumbSize, thumbPos, SCROLL_DrawInterior( hwnd, hdc, nBar, &rect, arrowSize, thumbSize, thumbPos,
...@@ -836,9 +843,7 @@ static void SCROLL_HandleScrollEvent( HWND hwnd, INT nBar, UINT msg, POINT pt) ...@@ -836,9 +843,7 @@ static void SCROLL_HandleScrollEvent( HWND hwnd, INT nBar, UINT msg, POINT pt)
break; break;
case SCROLL_TOP_RECT: case SCROLL_TOP_RECT:
SCROLL_DrawInterior( hwnd, hdc, nBar, &rect, arrowSize, thumbSize, SCROLL_DrawScrollBar( hwnd, hdc, nBar, hittest, FALSE, TRUE );
thumbPos, infoPtr->flags, vertical,
(hittest == SCROLL_trackHitTest), FALSE );
if (hittest == SCROLL_trackHitTest) if (hittest == SCROLL_trackHitTest)
{ {
if ((msg == WM_LBUTTONDOWN) || (msg == WM_SYSTIMER)) if ((msg == WM_LBUTTONDOWN) || (msg == WM_SYSTIMER))
...@@ -869,9 +874,7 @@ static void SCROLL_HandleScrollEvent( HWND hwnd, INT nBar, UINT msg, POINT pt) ...@@ -869,9 +874,7 @@ static void SCROLL_HandleScrollEvent( HWND hwnd, INT nBar, UINT msg, POINT pt)
} }
else if (msg == WM_LBUTTONUP) else if (msg == WM_LBUTTONUP)
{ {
SCROLL_DrawInterior( hwnd, hdc, nBar, &rect, arrowSize, thumbSize, SCROLL_DrawScrollBar( hwnd, hdc, nBar, SCROLL_NOWHERE, FALSE, TRUE );
thumbPos, infoPtr->flags, vertical,
FALSE, FALSE );
} }
else /* WM_MOUSEMOVE */ else /* WM_MOUSEMOVE */
{ {
...@@ -900,9 +903,7 @@ static void SCROLL_HandleScrollEvent( HWND hwnd, INT nBar, UINT msg, POINT pt) ...@@ -900,9 +903,7 @@ static void SCROLL_HandleScrollEvent( HWND hwnd, INT nBar, UINT msg, POINT pt)
break; break;
case SCROLL_BOTTOM_RECT: case SCROLL_BOTTOM_RECT:
SCROLL_DrawInterior( hwnd, hdc, nBar, &rect, arrowSize, thumbSize, SCROLL_DrawScrollBar( hwnd, hdc, nBar, hittest, FALSE, TRUE );
thumbPos, infoPtr->flags, vertical,
FALSE, (hittest == SCROLL_trackHitTest) );
if (hittest == SCROLL_trackHitTest) if (hittest == SCROLL_trackHitTest)
{ {
if ((msg == WM_LBUTTONDOWN) || (msg == WM_SYSTIMER)) if ((msg == WM_LBUTTONDOWN) || (msg == WM_SYSTIMER))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment