2 * ReactOS W32 Subsystem
3 * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 * COPYRIGHT: See COPYING in the top level directory
22 * PROJECT: ReactOS kernel
24 * FILE: subsys/win32k/ntuser/scrollbar.c
25 * PROGRAMER: Thomas Weidenmueller (w3seek@users.sourceforge.net)
26 * Jason Filby (jasonfilby@yahoo.com)
28 * 16-11-2002 Jason Filby Created
30 /* INCLUDES ******************************************************************/
37 #define MINTRACKTHUMB 8 /* Minimum size of the rectangle between the arrows */
39 #define SBRG_SCROLLBAR 0 /* the scrollbar itself */
40 #define SBRG_TOPRIGHTBTN 1 /* the top or right button */
41 #define SBRG_PAGEUPRIGHT 2 /* the page up or page right region */
42 #define SBRG_SCROLLBOX 3 /* the scroll box */
43 #define SBRG_PAGEDOWNLEFT 4 /* the page down or page left region */
44 #define SBRG_BOTTOMLEFTBTN 5 /* the bottom or left button */
46 #define CHANGERGSTATE(item, status) \
47 if(Info->rgstate[(item)] != (status)) \
49 Info->rgstate[(item)] = (status);
51 /* FUNCTIONS *****************************************************************/
53 /* Ported from WINE20020904 */
54 /* Compute the scroll bar rectangle, in drawing coordinates (i.e. client coords for SB_CTL, window coords for SB_VERT and
55 * SB_HORZ). 'arrowSize' returns the width or height of an arrow (depending on * the orientation of the scrollbar),
56 * 'thumbSize' returns the size of the thumb, and 'thumbPos' returns the position of the thumb relative to the left or to
57 * the top. Return TRUE if the scrollbar is vertical, FALSE if horizontal.
60 IntGetScrollBarRect (PWINDOW_OBJECT Window
, INT nBar
, PRECT lprect
)
63 RECT ClientRect
= Window
->ClientRect
;
64 RECT WindowRect
= Window
->WindowRect
;
69 lprect
->left
= ClientRect
.left
- WindowRect
.left
;
70 lprect
->top
= ClientRect
.bottom
- WindowRect
.top
;
71 lprect
->right
= ClientRect
.right
- WindowRect
.left
;
72 lprect
->bottom
= lprect
->top
+ UserGetSystemMetrics (SM_CYHSCROLL
);
77 if(Window
->ExStyle
& WS_EX_LEFTSCROLLBAR
)
79 lprect
->right
= ClientRect
.left
- WindowRect
.left
;
80 lprect
->left
= lprect
->right
- UserGetSystemMetrics(SM_CXVSCROLL
);
84 lprect
->left
= ClientRect
.right
- WindowRect
.left
;
85 lprect
->right
= lprect
->left
+ UserGetSystemMetrics(SM_CXVSCROLL
);
87 lprect
->top
= ClientRect
.top
- WindowRect
.top
;
88 lprect
->bottom
= ClientRect
.bottom
- WindowRect
.top
;
93 IntGetClientRect (Window
, lprect
);
94 vertical
= ((Window
->Style
& SBS_VERT
) != 0);
105 IntCalculateThumb(PWINDOW_OBJECT Window
, LONG idObject
, PSCROLLBARINFO psbi
, LPSCROLLINFO psi
)
107 INT Thumb
, ThumbBox
, ThumbPos
, cxy
, mx
;
113 Thumb
= UserGetSystemMetrics(SM_CXHSCROLL
);
114 cxy
= psbi
->rcScrollBar
.right
- psbi
->rcScrollBar
.left
;
117 Thumb
= UserGetSystemMetrics(SM_CYVSCROLL
);
118 cxy
= psbi
->rcScrollBar
.bottom
- psbi
->rcScrollBar
.top
;
121 IntGetClientRect (Window
, &ClientRect
);
122 if(Window
->Style
& SBS_VERT
)
124 Thumb
= UserGetSystemMetrics(SM_CYVSCROLL
);
125 cxy
= ClientRect
.bottom
- ClientRect
.top
;
129 Thumb
= UserGetSystemMetrics(SM_CXHSCROLL
);
130 cxy
= ClientRect
.right
- ClientRect
.left
;
138 /* calculate Thumb */
139 if(cxy
<= (2 * Thumb
))
142 psbi
->xyThumbTop
= 0;
143 psbi
->xyThumbBottom
= 0;
148 ThumbBox
= psi
->nPage
? MINTRACKTHUMB
: UserGetSystemMetrics(SM_CXHTHUMB
);
154 ThumbBox
= max(EngMulDiv(cxy
, psi
->nPage
, psi
->nMax
- psi
->nMin
+ 1), ThumbBox
);
159 mx
= psi
->nMax
- max(psi
->nPage
- 1, 0);
161 ThumbPos
= Thumb
+ EngMulDiv(cxy
- ThumbBox
, psi
->nPos
- psi
->nMin
, mx
- psi
->nMin
);
163 ThumbPos
= Thumb
+ ThumbBox
;
166 psbi
->xyThumbTop
= ThumbPos
;
167 psbi
->xyThumbBottom
= ThumbPos
+ ThumbBox
;
171 psbi
->xyThumbTop
= 0;
172 psbi
->xyThumbBottom
= 0;
175 psbi
->dxyLineButton
= Thumb
;
181 IntUpdateSBInfo(PWINDOW_OBJECT Window
, int wBar
)
187 ASSERT(Window
->Scroll
);
189 sbi
= IntGetScrollbarInfoFromWindow(Window
, wBar
);
190 psi
= IntGetScrollInfoFromWindow(Window
, wBar
);
191 IntGetScrollBarRect(Window
, wBar
, &(sbi
->rcScrollBar
));
192 IntCalculateThumb(Window
, wBar
, sbi
, psi
);
196 co_IntGetScrollInfo(PWINDOW_OBJECT Window
, INT nBar
, LPSCROLLINFO lpsi
)
203 if(!SBID_IS_VALID(nBar
))
205 SetLastWin32Error(ERROR_INVALID_PARAMETER
);
206 DPRINT1("Trying to get scrollinfo for unknown scrollbar type %d\n", nBar
);
210 if(!co_IntCreateScrollBars(Window
))
215 psi
= IntGetScrollInfoFromWindow(Window
, nBar
);
217 if (lpsi
->fMask
== SIF_ALL
)
219 Mask
= SIF_PAGE
| SIF_POS
| SIF_RANGE
| SIF_TRACKPOS
;
226 if (0 != (Mask
& SIF_PAGE
))
228 lpsi
->nPage
= psi
->nPage
;
231 if (0 != (Mask
& SIF_POS
))
233 lpsi
->nPos
= psi
->nPos
;
236 if (0 != (Mask
& SIF_RANGE
))
238 lpsi
->nMin
= psi
->nMin
;
239 lpsi
->nMax
= psi
->nMax
;
242 if (0 != (Mask
& SIF_TRACKPOS
))
244 lpsi
->nTrackPos
= psi
->nTrackPos
;
250 static DWORD FASTCALL
251 co_IntSetScrollInfo(PWINDOW_OBJECT Window
, INT nBar
, LPCSCROLLINFO lpsi
, BOOL bRedraw
)
254 * Update the scrollbar state and set action flags according to
255 * what has to be done graphics wise.
261 BOOL bChangeParams
= FALSE
; /* don't show/hide scrollbar if params don't change */
265 if(!SBID_IS_VALID(nBar
))
267 SetLastWin32Error(ERROR_INVALID_PARAMETER
);
268 DPRINT1("Trying to set scrollinfo for unknown scrollbar type %d", nBar
);
272 if(!co_IntCreateScrollBars(Window
))
277 if (lpsi
->cbSize
!= sizeof(SCROLLINFO
) &&
278 lpsi
->cbSize
!= (sizeof(SCROLLINFO
) - sizeof(lpsi
->nTrackPos
)))
280 SetLastWin32Error(ERROR_INVALID_PARAMETER
);
283 if (lpsi
->fMask
& ~(SIF_ALL
| SIF_DISABLENOSCROLL
))
285 SetLastWin32Error(ERROR_INVALID_PARAMETER
);
289 psbi
= IntGetScrollbarInfoFromWindow(Window
, nBar
);
290 Info
= IntGetScrollInfoFromWindow(Window
, nBar
);
292 /* Set the page size */
293 if (0 != (lpsi
->fMask
& SIF_PAGE
))
295 if (Info
->nPage
!= lpsi
->nPage
)
297 Info
->nPage
= lpsi
->nPage
;
298 bChangeParams
= TRUE
;
302 /* Set the scroll pos */
303 if (0 != (lpsi
->fMask
& SIF_POS
))
305 if (Info
->nPos
!= lpsi
->nPos
)
307 Info
->nPos
= lpsi
->nPos
;
311 /* Set the scroll range */
312 if (0 != (lpsi
->fMask
& SIF_RANGE
))
314 /* Invalid range -> range is set to (0,0) */
315 if (lpsi
->nMin
> lpsi
->nMax
||
316 0x80000000 <= (UINT
)(lpsi
->nMax
- lpsi
->nMin
))
320 bChangeParams
= TRUE
;
322 else if (Info
->nMin
!= lpsi
->nMin
|| Info
->nMax
!= lpsi
->nMax
)
324 Info
->nMin
= lpsi
->nMin
;
325 Info
->nMax
= lpsi
->nMax
;
326 bChangeParams
= TRUE
;
330 /* Make sure the page size is valid */
335 else if (Info
->nMax
- Info
->nMin
+ 1 < Info
->nPage
)
337 Info
->nPage
= Info
->nMax
- Info
->nMin
+ 1;
340 /* Make sure the pos is inside the range */
341 if (Info
->nPos
< Info
->nMin
)
343 Info
->nPos
= Info
->nMin
;
345 else if (Info
->nPos
> Info
->nMax
- max(Info
->nPage
- 1, 0))
347 Info
->nPos
= Info
->nMax
- max(Info
->nPage
- 1, 0);
351 * Don't change the scrollbar state if SetScrollInfo is just called
352 * with SIF_DISABLENOSCROLL
354 if (0 == (lpsi
->fMask
& SIF_ALL
))
359 /* Check if the scrollbar should be hidden or disabled */
360 if (0 != (lpsi
->fMask
& (SIF_RANGE
| SIF_PAGE
| SIF_DISABLENOSCROLL
)))
362 if (Info
->nMin
>= (int)(Info
->nMax
- max(Info
->nPage
- 1, 0)))
364 /* Hide or disable scroll-bar */
365 if (0 != (lpsi
->fMask
& SIF_DISABLENOSCROLL
))
367 /* new_flags = ESB_DISABLE_BOTH;*/
369 else if ((nBar
!= SB_CTL
) && bChangeParams
)
371 co_UserShowScrollBar(Window
, nBar
, FALSE
);
375 else /* Show and enable scroll-bar */
378 if ((nBar
!= SB_CTL
) && bChangeParams
)
380 co_UserShowScrollBar(Window
, nBar
, TRUE
);
385 if (infoPtr
->flags
!= new_flags
) /* check arrow flags */
387 infoPtr
->flags
= new_flags
;
388 *Action
|= SA_SSI_REPAINT_ARROWS
;
395 RECT UpdateRect
= psbi
->rcScrollBar
;
396 UpdateRect
.left
-= Window
->ClientRect
.left
- Window
->WindowRect
.left
;
397 UpdateRect
.right
-= Window
->ClientRect
.left
- Window
->WindowRect
.left
;
398 UpdateRect
.top
-= Window
->ClientRect
.top
- Window
->WindowRect
.top
;
399 UpdateRect
.bottom
-= Window
->ClientRect
.top
- Window
->WindowRect
.top
;
400 co_UserRedrawWindow(Window
, &UpdateRect
, 0, RDW_INVALIDATE
| RDW_FRAME
);
403 /* Return current position */
408 co_IntGetScrollBarInfo(PWINDOW_OBJECT Window
, LONG idObject
, PSCROLLBARINFO psbi
)
416 Bar
= SBOBJ_TO_SBID(idObject
);
418 if(!SBID_IS_VALID(Bar
))
420 SetLastWin32Error(ERROR_INVALID_PARAMETER
);
421 DPRINT1("Trying to get scrollinfo for unknown scrollbar type %d\n", Bar
);
425 if(!co_IntCreateScrollBars(Window
))
430 sbi
= IntGetScrollbarInfoFromWindow(Window
, Bar
);
431 psi
= IntGetScrollInfoFromWindow(Window
, Bar
);
433 IntGetScrollBarRect(Window
, Bar
, &(sbi
->rcScrollBar
));
434 IntCalculateThumb(Window
, Bar
, sbi
, psi
);
436 RtlCopyMemory(psbi
, sbi
, sizeof(SCROLLBARINFO
));
442 co_IntCreateScrollBars(PWINDOW_OBJECT Window
)
454 /* no need to create it anymore */
458 /* allocate memory for all scrollbars (HORZ, VERT, CONTROL) */
459 Size
= 3 * (sizeof(WINDOW_SCROLLINFO
));
460 if(!(Window
->Scroll
= ExAllocatePoolWithTag(PagedPool
, Size
, TAG_SBARINFO
)))
462 DPRINT1("Unable to allocate memory for scrollbar information for window 0x%x\n", Window
->hSelf
);
466 RtlZeroMemory(Window
->Scroll
, Size
);
468 Result
= co_WinPosGetNonClientSize(Window
->hSelf
,
470 &Window
->ClientRect
);
472 for(s
= SB_HORZ
; s
<= SB_VERT
; s
++)
474 psbi
= IntGetScrollbarInfoFromWindow(Window
, s
);
475 psbi
->cbSize
= sizeof(SCROLLBARINFO
);
476 for (i
= 0; i
< CCHILDREN_SCROLLBAR
+ 1; i
++)
477 psbi
->rgstate
[i
] = 0;
479 psi
= IntGetScrollInfoFromWindow(Window
, s
);
480 psi
->cbSize
= sizeof(LPSCROLLINFO
);
483 IntGetScrollBarRect(Window
, s
, &(psbi
->rcScrollBar
));
484 IntCalculateThumb(Window
, s
, psbi
, psi
);
491 IntDestroyScrollBars(PWINDOW_OBJECT Window
)
495 ExFreePool(Window
->Scroll
);
496 Window
->Scroll
= NULL
;
503 IntEnableScrollBar(BOOL Horz
, PSCROLLBARINFO Info
, UINT wArrows
)
508 case ESB_DISABLE_BOTH
:
509 CHANGERGSTATE(SBRG_TOPRIGHTBTN
, STATE_SYSTEM_UNAVAILABLE
);
510 CHANGERGSTATE(SBRG_BOTTOMLEFTBTN
, STATE_SYSTEM_UNAVAILABLE
);
512 case ESB_DISABLE_RTDN
:
515 CHANGERGSTATE(SBRG_BOTTOMLEFTBTN
, STATE_SYSTEM_UNAVAILABLE
);
519 CHANGERGSTATE(SBRG_TOPRIGHTBTN
, STATE_SYSTEM_UNAVAILABLE
);
522 case ESB_DISABLE_LTUP
:
525 CHANGERGSTATE(SBRG_TOPRIGHTBTN
, STATE_SYSTEM_UNAVAILABLE
);
529 CHANGERGSTATE(SBRG_BOTTOMLEFTBTN
, STATE_SYSTEM_UNAVAILABLE
);
532 case ESB_ENABLE_BOTH
:
533 CHANGERGSTATE(SBRG_TOPRIGHTBTN
, 0);
534 CHANGERGSTATE(SBRG_BOTTOMLEFTBTN
, 0);
543 NtUserGetScrollBarInfo(HWND hWnd
, LONG idObject
, PSCROLLBARINFO psbi
)
547 PWINDOW_OBJECT Window
;
549 DECLARE_RETURN(BOOL
);
551 DPRINT("Enter NtUserGetScrollBarInfo\n");
552 UserEnterExclusive();
554 Status
= MmCopyFromCaller(&sbi
, psbi
, sizeof(SCROLLBARINFO
));
555 if(!NT_SUCCESS(Status
) || (sbi
.cbSize
!= sizeof(SCROLLBARINFO
)))
557 SetLastNtError(Status
);
561 if(!(Window
= UserGetWindowObject(hWnd
)))
566 UserReferenceWindowObjectCo(Window
);
567 Ret
= co_IntGetScrollBarInfo(Window
, idObject
, &sbi
);
568 UserDereferenceWindowObjectCo(Window
);
570 Status
= MmCopyToCaller(psbi
, &sbi
, sizeof(SCROLLBARINFO
));
571 if(!NT_SUCCESS(Status
))
573 SetLastNtError(Status
);
580 DPRINT("Leave NtUserGetScrollBarInfo, ret=%i\n",_ret_
);
589 NtUserGetScrollInfo(HWND hWnd
, int fnBar
, LPSCROLLINFO lpsi
)
592 PWINDOW_OBJECT Window
;
596 DECLARE_RETURN(BOOL
);
598 DPRINT("Enter NtUserGetScrollInfo\n");
601 Status
= MmCopyFromCaller(&psi
.cbSize
, &(lpsi
->cbSize
), sizeof(UINT
));
602 if(!NT_SUCCESS(Status
) ||
603 !((psi
.cbSize
== sizeof(SCROLLINFO
)) || (psi
.cbSize
== sizeof(SCROLLINFO
) - sizeof(psi
.nTrackPos
))))
605 SetLastNtError(Status
);
609 Status
= MmCopyFromCaller(&psi
, lpsi
, sz
);
610 if (!NT_SUCCESS(Status
))
612 SetLastNtError(Status
);
616 if(!(Window
= UserGetWindowObject(hWnd
)))
621 UserReferenceWindowObjectCo(Window
);
622 Ret
= co_IntGetScrollInfo(Window
, fnBar
, &psi
);
623 UserDereferenceWindowObjectCo(Window
);
625 Status
= MmCopyToCaller(lpsi
, &psi
, sz
);
626 if(!NT_SUCCESS(Status
))
628 SetLastNtError(Status
);
635 DPRINT("Leave NtUserGetScrollInfo, ret=%i\n",_ret_
);
643 NtUserEnableScrollBar(
648 PWINDOW_OBJECT Window
= NULL
;
649 PSCROLLBARINFO InfoV
= NULL
, InfoH
= NULL
;
651 DECLARE_RETURN(BOOL
);
653 DPRINT("Enter NtUserEnableScrollBar\n");
654 UserEnterExclusive();
656 if(!(Window
= UserGetWindowObject(hWnd
)))
660 UserReferenceWindowObjectCo(Window
);
662 if(wSBflags
== SB_CTL
)
664 /* FIXME Enable or Disable SB Ctrl*/
665 DPRINT1("Enable Scrollbar SB_CTL\n");
666 InfoV
= IntGetScrollbarInfoFromWindow(Window
, SB_CTL
);
667 Chg
= IntEnableScrollBar(FALSE
, InfoV
,wArrows
);
668 /* Chg? Scrollbar is Refresh in user32/controls/scrollbar.c. */
673 if(wSBflags
!= SB_BOTH
&& !SBID_IS_VALID(wSBflags
))
675 SetLastWin32Error(ERROR_INVALID_PARAMETER
);
676 DPRINT1("Trying to set scrollinfo for unknown scrollbar type %d", wSBflags
);
680 if(!co_IntCreateScrollBars(Window
))
688 InfoV
= IntGetScrollbarInfoFromWindow(Window
, SB_VERT
);
691 InfoH
= IntGetScrollbarInfoFromWindow(Window
, SB_HORZ
);
694 InfoV
= IntGetScrollbarInfoFromWindow(Window
, SB_VERT
);
701 Chg
= IntEnableScrollBar(FALSE
, InfoV
, wArrows
);
704 Chg
= (IntEnableScrollBar(TRUE
, InfoH
, wArrows
) || Chg
);
706 //if(Chg && (Window->Style & WS_VISIBLE))
707 /* FIXME - repaint scrollbars */
712 if (Window
) UserDereferenceWindowObjectCo(Window
);
714 DPRINT("Leave NtUserEnableScrollBar, ret=%i\n",_ret_
);
721 NtUserSetScrollBarInfo(
724 SETSCROLLBARINFO
*info
)
726 PWINDOW_OBJECT Window
= NULL
;
727 SETSCROLLBARINFO Safeinfo
;
732 DECLARE_RETURN(BOOL
);
734 DPRINT("Enter NtUserSetScrollBarInfo\n");
735 UserEnterExclusive();
737 if(!(Window
= UserGetWindowObject(hWnd
)))
741 UserReferenceWindowObjectCo(Window
);
743 Obj
= SBOBJ_TO_SBID(idObject
);
744 if(!SBID_IS_VALID(Obj
))
746 SetLastWin32Error(ERROR_INVALID_PARAMETER
);
747 DPRINT1("Trying to set scrollinfo for unknown scrollbar type %d", Obj
);
751 if(!co_IntCreateScrollBars(Window
))
756 Status
= MmCopyFromCaller(&Safeinfo
, info
, sizeof(SETSCROLLBARINFO
));
757 if(!NT_SUCCESS(Status
))
759 SetLastNtError(Status
);
763 sbi
= IntGetScrollbarInfoFromWindow(Window
, Obj
);
764 psi
= IntGetScrollInfoFromWindow(Window
, Obj
);
766 psi
->nTrackPos
= Safeinfo
.nTrackPos
;
767 sbi
->reserved
= Safeinfo
.reserved
;
768 RtlCopyMemory(&sbi
->rgstate
, &Safeinfo
.rgstate
, sizeof(Safeinfo
.rgstate
));
773 if (Window
) UserDereferenceWindowObjectCo(Window
);
775 DPRINT("Leave NtUserSetScrollBarInfo, ret=%i\n",_ret_
);
788 PWINDOW_OBJECT Window
= NULL
;
790 SCROLLINFO ScrollInfo
;
791 DECLARE_RETURN(DWORD
);
793 DPRINT("Enter NtUserSetScrollInfo\n");
794 UserEnterExclusive();
796 if(!(Window
= UserGetWindowObject(hWnd
)))
800 UserReferenceWindowObjectCo(Window
);
802 Status
= MmCopyFromCaller(&ScrollInfo
, lpsi
, sizeof(SCROLLINFO
) - sizeof(ScrollInfo
.nTrackPos
));
803 if(!NT_SUCCESS(Status
))
805 SetLastNtError(Status
);
809 RETURN(co_IntSetScrollInfo(Window
, fnBar
, &ScrollInfo
, bRedraw
));
812 if (Window
) UserDereferenceWindowObjectCo(Window
);
814 DPRINT("Leave NtUserSetScrollInfo, ret=%i\n",_ret_
);
820 /* Ported from WINE20020904 (SCROLL_ShowScrollBar) */
822 co_UserShowScrollBar(PWINDOW_OBJECT Window
, int wBar
, DWORD bShow
)
824 DWORD Style
, OldStyle
;
837 Style
= WS_HSCROLL
| WS_VSCROLL
;
843 SetLastWin32Error(ERROR_INVALID_PARAMETER
);
847 if(!co_IntCreateScrollBars(Window
))
854 IntUpdateSBInfo(Window
, SB_CTL
);
856 co_WinPosShowWindow(Window
->hSelf
, bShow
? SW_SHOW
: SW_HIDE
);
860 OldStyle
= Window
->Style
;
862 Window
->Style
|= Style
;
864 Window
->Style
&= ~Style
;
866 if(Window
->Style
!= OldStyle
)
868 if(Window
->Style
& WS_HSCROLL
)
869 IntUpdateSBInfo(Window
, SB_HORZ
);
870 if(Window
->Style
& WS_VSCROLL
)
871 IntUpdateSBInfo(Window
, SB_VERT
);
873 if(Window
->Style
& WS_VISIBLE
)
875 /* Frame has been changed, let the window redraw itself */
876 co_WinPosSetWindowPos(Window
->hSelf
, 0, 0, 0, 0, 0, SWP_NOSIZE
| SWP_NOMOVE
|
877 SWP_NOACTIVATE
| SWP_NOZORDER
| SWP_FRAMECHANGED
| SWP_NOSENDCHANGING
);
886 NtUserShowScrollBar(HWND hWnd
, int wBar
, DWORD bShow
)
888 PWINDOW_OBJECT Window
;
889 DECLARE_RETURN(DWORD
);
892 DPRINT("Enter NtUserShowScrollBar\n");
893 UserEnterExclusive();
895 if (!(Window
= UserGetWindowObject(hWnd
)))
900 UserReferenceWindowObjectCo(Window
);
901 ret
= co_UserShowScrollBar(Window
, wBar
, bShow
);
902 UserDereferenceWindowObjectCo(Window
);
907 DPRINT("Leave NtUserShowScrollBar, ret%i\n",_ret_
);