user32: Introduce a SCROLL_DrawNCScrollBar() to draw scroll bars in non-client area.
Having a SCROLL_DrawNCScrollBar() in scroll.c enables it to access global variables there. So that global variables access in SCROLL_DrawScrollBar() can be moved outside of it and SCROLL_DrawScrollBar() can then be refactored into a function without access to global variables. Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
ac6817de54
commit
5541cf32c5
|
@ -179,6 +179,7 @@ extern BOOL NC_DrawSysButton( HWND hwnd, HDC hdc, BOOL down ) DECLSPEC_HIDDEN;
|
|||
extern void NC_GetSysPopupPos( HWND hwnd, RECT* rect ) DECLSPEC_HIDDEN;
|
||||
|
||||
/* scrollbar */
|
||||
extern void SCROLL_DrawNCScrollBar( HWND hwnd, HDC hdc, BOOL draw_horizontal, BOOL draw_vertical ) DECLSPEC_HIDDEN;
|
||||
extern void SCROLL_DrawScrollBar( HWND hwnd, HDC hdc, INT nBar, BOOL arrows, BOOL interior ) DECLSPEC_HIDDEN;
|
||||
extern void SCROLL_TrackScrollBar( HWND hwnd, INT scrollbar, POINT pt ) DECLSPEC_HIDDEN;
|
||||
|
||||
|
|
|
@ -1027,11 +1027,7 @@ static void NC_DoNCPaint( HWND hwnd, HRGN clip )
|
|||
DrawEdge (hdc, &rect, EDGE_SUNKEN, BF_RECT | BF_ADJUST);
|
||||
|
||||
/* Draw the scroll-bars */
|
||||
|
||||
if (dwStyle & WS_VSCROLL)
|
||||
SCROLL_DrawScrollBar( hwnd, hdc, SB_VERT, TRUE, TRUE );
|
||||
if (dwStyle & WS_HSCROLL)
|
||||
SCROLL_DrawScrollBar( hwnd, hdc, SB_HORZ, TRUE, TRUE );
|
||||
SCROLL_DrawNCScrollBar( hwnd, hdc, dwStyle & WS_HSCROLL, dwStyle & WS_VSCROLL );
|
||||
|
||||
/* Draw the "size-box" */
|
||||
if ((dwStyle & WS_VSCROLL) && (dwStyle & WS_HSCROLL))
|
||||
|
|
|
@ -646,6 +646,14 @@ void SCROLL_DrawScrollBar( HWND hwnd, HDC hdc, INT nBar,
|
|||
}
|
||||
}
|
||||
|
||||
void SCROLL_DrawNCScrollBar( HWND hwnd, HDC hdc, BOOL draw_horizontal, BOOL draw_vertical )
|
||||
{
|
||||
if (draw_horizontal)
|
||||
SCROLL_DrawScrollBar( hwnd, hdc, SB_HORZ, TRUE, TRUE );
|
||||
if (draw_vertical)
|
||||
SCROLL_DrawScrollBar( hwnd, hdc, SB_VERT, TRUE, TRUE );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* SCROLL_DrawSizeGrip
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue