@@ -35,7 +35,7 @@ static BOOL SCROLL_IsVertical(HWND hwnd, INT nBar)
35
35
}
36
36
}
37
37
38
- static LONG SCROLL_getObjectId (INT nBar )
38
+ LONG SCROLL_getObjectId (INT nBar )
39
39
{
40
40
switch (nBar )
41
41
{
@@ -273,53 +273,62 @@ static void SCROLL_DrawMovingThumb(PWND_DATA pwndData, PDRAW_CONTEXT pcontext, S
273
273
274
274
275
275
void
276
- ThemeDrawScrollBar (PDRAW_CONTEXT pcontext , INT nBar , POINT * pt )
276
+ ThemeDrawScrollBarEx (PDRAW_CONTEXT pcontext , INT nBar , PSCROLLBARINFO psbi , POINT * pt )
277
277
{
278
278
SCROLLINFO si ;
279
- SCROLLBARINFO sbi ;
280
279
BOOL vertical ;
281
280
enum SCROLL_HITTEST htHot = SCROLL_NOWHERE ;
282
281
PWND_DATA pwndData ;
283
282
284
- if (((nBar == SB_VERT ) && !(pcontext -> wi .dwStyle & WS_VSCROLL )) ||
285
- ((nBar == SB_HORZ ) && !(pcontext -> wi .dwStyle & WS_HSCROLL ))) return ;
286
-
287
283
if (!(pwndData = ThemeGetWndData (pcontext -> hWnd )))
288
284
return ;
289
285
290
286
if (pwndData -> SCROLL_TrackingWin )
291
287
return ;
292
288
293
289
/* Retrieve scrollbar info */
294
- sbi .cbSize = sizeof (sbi );
295
290
si .cbSize = sizeof (si );
296
291
si .fMask = SIF_ALL ;
297
292
GetScrollInfo (pcontext -> hWnd , nBar , & si );
298
- GetScrollBarInfo (pcontext -> hWnd , SCROLL_getObjectId (nBar ), & sbi );
299
293
vertical = SCROLL_IsVertical (pcontext -> hWnd , nBar );
300
- if (sbi . rgstate [SCROLL_TOP_ARROW ] & STATE_SYSTEM_UNAVAILABLE &&
301
- sbi . rgstate [SCROLL_BOTTOM_ARROW ] & STATE_SYSTEM_UNAVAILABLE )
294
+ if (psbi -> rgstate [SCROLL_TOP_ARROW ] & STATE_SYSTEM_UNAVAILABLE &&
295
+ psbi -> rgstate [SCROLL_BOTTOM_ARROW ] & STATE_SYSTEM_UNAVAILABLE )
302
296
{
303
- sbi . xyThumbTop = 0 ;
297
+ psbi -> xyThumbTop = 0 ;
304
298
}
305
299
306
300
/* The scrollbar rect is in screen coordinates */
307
- OffsetRect (& sbi . rcScrollBar , - pcontext -> wi .rcWindow .left , - pcontext -> wi .rcWindow .top );
301
+ OffsetRect (& psbi -> rcScrollBar , - pcontext -> wi .rcWindow .left , - pcontext -> wi .rcWindow .top );
308
302
309
303
if (pt )
310
304
{
311
305
ScreenToWindow (pcontext -> hWnd , pt );
312
- htHot = SCROLL_HitTest (pcontext -> hWnd , & sbi , vertical , * pt , FALSE);
306
+ htHot = SCROLL_HitTest (pcontext -> hWnd , psbi , vertical , * pt , FALSE);
313
307
}
314
308
315
309
/* do not draw if the scrollbar rectangle is empty */
316
- if (IsRectEmpty (& sbi . rcScrollBar )) return ;
310
+ if (IsRectEmpty (& psbi -> rcScrollBar )) return ;
317
311
318
312
/* Draw the scrollbar */
319
- SCROLL_DrawArrows ( pcontext , & sbi , vertical , 0 , htHot );
320
- SCROLL_DrawInterior ( pcontext , & sbi , sbi . xyThumbTop , vertical , 0 , htHot );
313
+ SCROLL_DrawArrows ( pcontext , psbi , vertical , 0 , htHot );
314
+ SCROLL_DrawInterior ( pcontext , psbi , psbi -> xyThumbTop , vertical , 0 , htHot );
321
315
}
322
316
317
+ void
318
+ ThemeDrawScrollBar (PDRAW_CONTEXT pcontext , INT nBar , POINT * pt )
319
+ {
320
+ SCROLLBARINFO sbi ;
321
+
322
+ if (((nBar == SB_VERT ) && !(pcontext -> wi .dwStyle & WS_VSCROLL )) ||
323
+ ((nBar == SB_HORZ ) && !(pcontext -> wi .dwStyle & WS_HSCROLL )))
324
+ {
325
+ return ;
326
+ }
327
+
328
+ sbi .cbSize = sizeof (sbi );
329
+ GetScrollBarInfo (pcontext -> hWnd , SCROLL_getObjectId (nBar ), & sbi );
330
+ ThemeDrawScrollBarEx (pcontext , nBar , & sbi , pt );
331
+ }
323
332
324
333
325
334
/***********************************************************************
0 commit comments