2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS kernel
5 * FILE: subsys/win32k/ntuser/scrollbar.c
6 * PROGRAMER: Thomas Weidenmueller (w3seek@users.sourceforge.net)
7 * Jason Filby (jasonfilby@yahoo.com)
9 * 16-11-2002 Jason Filby Created
11 /* INCLUDES ******************************************************************/
15 DBG_DEFAULT_CHANNEL(UserScrollbar
);
17 #define MINTRACKTHUMB 8 /* Minimum size of the rectangle between the arrows */
19 #define SBRG_SCROLLBAR 0 /* the scrollbar itself */
20 #define SBRG_TOPRIGHTBTN 1 /* the top or right button */
21 #define SBRG_PAGEUPRIGHT 2 /* the page up or page right region */
22 #define SBRG_SCROLLBOX 3 /* the scroll box */
23 #define SBRG_PAGEDOWNLEFT 4 /* the page down or page left region */
24 #define SBRG_BOTTOMLEFTBTN 5 /* the bottom or left button */
26 #define CHANGERGSTATE(item, status) \
27 if(Info->rgstate[(item)] != (status)) \
29 Info->rgstate[(item)] = (status);
31 /* FUNCTIONS *****************************************************************/
33 /* Ported from WINE20020904 */
34 /* Compute the scroll bar rectangle, in drawing coordinates (i.e. client coords for SB_CTL, window coords for SB_VERT and
35 * SB_HORZ). 'arrowSize' returns the width or height of an arrow (depending on * the orientation of the scrollbar),
36 * 'thumbSize' returns the size of the thumb, and 'thumbPos' returns the position of the thumb relative to the left or to
37 * the top. Return TRUE if the scrollbar is vertical, FALSE if horizontal.
40 IntGetScrollBarRect (PWND Wnd
, INT nBar
, RECTL
*lprect
)
43 RECTL ClientRect
= Wnd
->rcClient
;
44 RECTL WindowRect
= Wnd
->rcWindow
;
49 lprect
->left
= ClientRect
.left
- WindowRect
.left
;
50 lprect
->top
= ClientRect
.bottom
- WindowRect
.top
;
51 lprect
->right
= ClientRect
.right
- WindowRect
.left
;
52 lprect
->bottom
= lprect
->top
+ UserGetSystemMetrics (SM_CYHSCROLL
);
57 if(Wnd
->ExStyle
& WS_EX_LEFTSCROLLBAR
)
59 lprect
->right
= ClientRect
.left
- WindowRect
.left
;
60 lprect
->left
= lprect
->right
- UserGetSystemMetrics(SM_CXVSCROLL
);
64 lprect
->left
= ClientRect
.right
- WindowRect
.left
;
65 lprect
->right
= lprect
->left
+ UserGetSystemMetrics(SM_CXVSCROLL
);
67 lprect
->top
= ClientRect
.top
- WindowRect
.top
;
68 lprect
->bottom
= ClientRect
.bottom
- WindowRect
.top
;
73 IntGetClientRect (Wnd
, lprect
);
74 vertical
= ((Wnd
->style
& SBS_VERT
) != 0);
85 IntCalculateThumb(PWND Wnd
, LONG idObject
, PSCROLLBARINFO psbi
, LPSCROLLINFO psi
)
87 INT Thumb
, ThumbBox
, ThumbPos
, cxy
, mx
;
93 Thumb
= UserGetSystemMetrics(SM_CXHSCROLL
);
94 cxy
= psbi
->rcScrollBar
.right
- psbi
->rcScrollBar
.left
;
97 Thumb
= UserGetSystemMetrics(SM_CYVSCROLL
);
98 cxy
= psbi
->rcScrollBar
.bottom
- psbi
->rcScrollBar
.top
;
101 IntGetClientRect(Wnd
, &ClientRect
);
102 if(Wnd
->style
& SBS_VERT
)
104 Thumb
= UserGetSystemMetrics(SM_CYVSCROLL
);
105 cxy
= ClientRect
.bottom
- ClientRect
.top
;
109 Thumb
= UserGetSystemMetrics(SM_CXHSCROLL
);
110 cxy
= ClientRect
.right
- ClientRect
.left
;
118 /* calculate Thumb */
119 if(cxy
<= (2 * Thumb
))
122 psbi
->xyThumbTop
= 0;
123 psbi
->xyThumbBottom
= 0;
128 ThumbBox
= psi
->nPage
? MINTRACKTHUMB
: UserGetSystemMetrics(SM_CXHTHUMB
);
134 ThumbBox
= max(EngMulDiv(cxy
, psi
->nPage
, psi
->nMax
- psi
->nMin
+ 1), ThumbBox
);
139 mx
= psi
->nMax
- max(psi
->nPage
- 1, 0);
141 ThumbPos
= Thumb
+ EngMulDiv(cxy
- ThumbBox
, psi
->nPos
- psi
->nMin
, mx
- psi
->nMin
);
143 ThumbPos
= Thumb
+ ThumbBox
;
146 psbi
->xyThumbTop
= ThumbPos
;
147 psbi
->xyThumbBottom
= ThumbPos
+ ThumbBox
;
151 psbi
->xyThumbTop
= 0;
152 psbi
->xyThumbBottom
= 0;
155 psbi
->dxyLineButton
= Thumb
;
161 IntUpdateSBInfo(PWND Window
, int wBar
)
167 ASSERT(Window
->pSBInfoex
);
169 sbi
= IntGetScrollbarInfoFromWindow(Window
, wBar
);
170 psi
= IntGetScrollInfoFromWindow(Window
, wBar
);
171 IntGetScrollBarRect(Window
, wBar
, &(sbi
->rcScrollBar
));
172 IntCalculateThumb(Window
, wBar
, sbi
, psi
);
176 co_IntGetScrollInfo(PWND Window
, INT nBar
, LPSCROLLINFO lpsi
)
181 ASSERT_REFS_CO(Window
);
183 if(!SBID_IS_VALID(nBar
))
185 EngSetLastError(ERROR_INVALID_PARAMETER
);
186 ERR("Trying to get scrollinfo for unknown scrollbar type %d\n", nBar
);
190 if(!co_IntCreateScrollBars(Window
))
195 psi
= IntGetScrollInfoFromWindow(Window
, nBar
);
197 if (lpsi
->fMask
== SIF_ALL
)
199 Mask
= SIF_PAGE
| SIF_POS
| SIF_RANGE
| SIF_TRACKPOS
;
206 if (0 != (Mask
& SIF_PAGE
))
208 lpsi
->nPage
= psi
->nPage
;
211 if (0 != (Mask
& SIF_POS
))
213 lpsi
->nPos
= psi
->nPos
;
216 if (0 != (Mask
& SIF_RANGE
))
218 lpsi
->nMin
= psi
->nMin
;
219 lpsi
->nMax
= psi
->nMax
;
222 if (0 != (Mask
& SIF_TRACKPOS
))
224 lpsi
->nTrackPos
= psi
->nTrackPos
;
231 NEWco_IntGetScrollInfo(
238 PSBTRACK pSBTrack
= pWnd
->head
.pti
->pSBTrack
;
240 if (!SBID_IS_VALID(nBar
))
242 EngSetLastError(ERROR_INVALID_PARAMETER
);
243 ERR("Trying to get scrollinfo for unknown scrollbar type %d\n", nBar
);
249 if (0 != (Mask
& SIF_PAGE
))
251 lpsi
->nPage
= pSBData
->page
;
254 if (0 != (Mask
& SIF_POS
))
256 lpsi
->nPos
= pSBData
->pos
;
259 if (0 != (Mask
& SIF_RANGE
))
261 lpsi
->nMin
= pSBData
->posMin
;
262 lpsi
->nMax
= pSBData
->posMax
;
265 if (0 != (Mask
& SIF_TRACKPOS
))
268 pSBTrack
->nBar
== nBar
&&
269 pSBTrack
->spwndTrack
== pWnd
)
270 lpsi
->nTrackPos
= pSBTrack
->posNew
;
272 lpsi
->nTrackPos
= pSBData
->pos
;
274 return (Mask
& SIF_ALL
) !=0;
277 static DWORD FASTCALL
278 co_IntSetScrollInfo(PWND Window
, INT nBar
, LPCSCROLLINFO lpsi
, BOOL bRedraw
)
281 * Update the scrollbar state and set action flags according to
282 * what has to be done graphics wise.
288 BOOL bChangeParams
= FALSE
; /* don't show/hide scrollbar if params don't change */
290 ASSERT_REFS_CO(Window
);
292 if(!SBID_IS_VALID(nBar
))
294 EngSetLastError(ERROR_INVALID_PARAMETER
);
295 ERR("Trying to set scrollinfo for unknown scrollbar type %d", nBar
);
299 if(!co_IntCreateScrollBars(Window
))
304 if (lpsi
->cbSize
!= sizeof(SCROLLINFO
) &&
305 lpsi
->cbSize
!= (sizeof(SCROLLINFO
) - sizeof(lpsi
->nTrackPos
)))
307 EngSetLastError(ERROR_INVALID_PARAMETER
);
310 if (lpsi
->fMask
& ~(SIF_ALL
| SIF_DISABLENOSCROLL
))
312 EngSetLastError(ERROR_INVALID_PARAMETER
);
316 psbi
= IntGetScrollbarInfoFromWindow(Window
, nBar
);
317 Info
= IntGetScrollInfoFromWindow(Window
, nBar
);
319 /* Set the page size */
320 if (0 != (lpsi
->fMask
& SIF_PAGE
))
322 if (Info
->nPage
!= lpsi
->nPage
)
324 Info
->nPage
= lpsi
->nPage
;
325 bChangeParams
= TRUE
;
329 /* Set the scroll pos */
330 if (0 != (lpsi
->fMask
& SIF_POS
))
332 if (Info
->nPos
!= lpsi
->nPos
)
334 Info
->nPos
= lpsi
->nPos
;
338 /* Set the scroll range */
339 if (0 != (lpsi
->fMask
& SIF_RANGE
))
341 /* Invalid range -> range is set to (0,0) */
342 if (lpsi
->nMin
> lpsi
->nMax
||
343 0x80000000 <= (UINT
)(lpsi
->nMax
- lpsi
->nMin
))
347 bChangeParams
= TRUE
;
349 else if (Info
->nMin
!= lpsi
->nMin
|| Info
->nMax
!= lpsi
->nMax
)
351 Info
->nMin
= lpsi
->nMin
;
352 Info
->nMax
= lpsi
->nMax
;
353 bChangeParams
= TRUE
;
357 /* Make sure the page size is valid */
358 if (Info
->nMax
- Info
->nMin
+ 1 < Info
->nPage
)
360 Info
->nPage
= Info
->nMax
- Info
->nMin
+ 1;
363 /* Make sure the pos is inside the range */
364 if (Info
->nPos
< Info
->nMin
)
366 Info
->nPos
= Info
->nMin
;
368 else if (Info
->nPos
> Info
->nMax
- max(Info
->nPage
- 1, 0))
370 Info
->nPos
= Info
->nMax
- max(Info
->nPage
- 1, 0);
374 * Don't change the scrollbar state if SetScrollInfo is just called
375 * with SIF_DISABLENOSCROLL
377 if (0 == (lpsi
->fMask
& SIF_ALL
))
382 /* Check if the scrollbar should be hidden or disabled */
383 if (0 != (lpsi
->fMask
& (SIF_RANGE
| SIF_PAGE
| SIF_DISABLENOSCROLL
)))
385 if (Info
->nMin
>= (int)(Info
->nMax
- max(Info
->nPage
- 1, 0)))
387 /* Hide or disable scroll-bar */
388 if (0 != (lpsi
->fMask
& SIF_DISABLENOSCROLL
))
390 /* new_flags = ESB_DISABLE_BOTH;*/
392 else if ((nBar
!= SB_CTL
) && bChangeParams
)
394 co_UserShowScrollBar(Window
, nBar
, FALSE
);
398 else /* Show and enable scroll-bar */
401 if ((nBar
!= SB_CTL
) && bChangeParams
)
403 co_UserShowScrollBar(Window
, nBar
, TRUE
);
408 if (infoPtr
->flags
!= new_flags
) /* check arrow flags */
410 infoPtr
->flags
= new_flags
;
411 *Action
|= SA_SSI_REPAINT_ARROWS
;
419 RECTL UpdateRect
= psbi
->rcScrollBar
;
420 UpdateRect
.left
-= Window
->rcClient
.left
- Window
->rcWindow
.left
;
421 UpdateRect
.right
-= Window
->rcClient
.left
- Window
->rcWindow
.left
;
422 UpdateRect
.top
-= Window
->rcClient
.top
- Window
->rcWindow
.top
;
423 UpdateRect
.bottom
-= Window
->rcClient
.top
- Window
->rcWindow
.top
;
424 co_UserRedrawWindow(Window
, &UpdateRect
, 0, RDW_INVALIDATE
| RDW_FRAME
);
427 /* Return current position */
432 co_IntGetScrollBarInfo(PWND Window
, LONG idObject
, PSCROLLBARINFO psbi
)
438 ASSERT_REFS_CO(Window
);
440 Bar
= SBOBJ_TO_SBID(idObject
);
442 if(!SBID_IS_VALID(Bar
))
444 EngSetLastError(ERROR_INVALID_PARAMETER
);
445 ERR("Trying to get scrollinfo for unknown scrollbar type %d\n", Bar
);
449 if(!co_IntCreateScrollBars(Window
))
454 sbi
= IntGetScrollbarInfoFromWindow(Window
, Bar
);
455 psi
= IntGetScrollInfoFromWindow(Window
, Bar
);
457 IntGetScrollBarRect(Window
, Bar
, &(sbi
->rcScrollBar
));
458 IntCalculateThumb(Window
, Bar
, sbi
, psi
);
460 RtlCopyMemory(psbi
, sbi
, sizeof(SCROLLBARINFO
));
466 co_IntCreateScrollBars(PWND Window
)
473 ASSERT_REFS_CO(Window
);
475 if(Window
->pSBInfoex
)
477 /* no need to create it anymore */
481 /* allocate memory for all scrollbars (HORZ, VERT, CONTROL) */
482 Size
= 3 * (sizeof(SBINFOEX
));
483 if(!(Window
->pSBInfoex
= ExAllocatePoolWithTag(PagedPool
, Size
, TAG_SBARINFO
)))
485 ERR("Unable to allocate memory for scrollbar information for window 0x%x\n", Window
->head
.h
);
489 RtlZeroMemory(Window
->pSBInfoex
, Size
);
491 co_WinPosGetNonClientSize(Window
,
495 for(s
= SB_HORZ
; s
<= SB_VERT
; s
++)
497 psbi
= IntGetScrollbarInfoFromWindow(Window
, s
);
498 psbi
->cbSize
= sizeof(SCROLLBARINFO
);
499 for (i
= 0; i
< CCHILDREN_SCROLLBAR
+ 1; i
++)
500 psbi
->rgstate
[i
] = 0;
502 psi
= IntGetScrollInfoFromWindow(Window
, s
);
503 psi
->cbSize
= sizeof(LPSCROLLINFO
);
506 IntGetScrollBarRect(Window
, s
, &(psbi
->rcScrollBar
));
507 IntCalculateThumb(Window
, s
, psbi
, psi
);
514 IntDestroyScrollBars(PWND Window
)
516 if(Window
->pSBInfoex
)
518 ExFreePool(Window
->pSBInfoex
);
519 Window
->pSBInfoex
= NULL
;
526 IntEnableScrollBar(BOOL Horz
, PSCROLLBARINFO Info
, UINT wArrows
)
531 case ESB_DISABLE_BOTH
:
532 CHANGERGSTATE(SBRG_TOPRIGHTBTN
, STATE_SYSTEM_UNAVAILABLE
);
533 CHANGERGSTATE(SBRG_BOTTOMLEFTBTN
, STATE_SYSTEM_UNAVAILABLE
);
535 case ESB_DISABLE_RTDN
:
538 CHANGERGSTATE(SBRG_BOTTOMLEFTBTN
, STATE_SYSTEM_UNAVAILABLE
);
542 CHANGERGSTATE(SBRG_TOPRIGHTBTN
, STATE_SYSTEM_UNAVAILABLE
);
545 case ESB_DISABLE_LTUP
:
548 CHANGERGSTATE(SBRG_TOPRIGHTBTN
, STATE_SYSTEM_UNAVAILABLE
);
552 CHANGERGSTATE(SBRG_BOTTOMLEFTBTN
, STATE_SYSTEM_UNAVAILABLE
);
555 case ESB_ENABLE_BOTH
:
556 CHANGERGSTATE(SBRG_TOPRIGHTBTN
, 0);
557 CHANGERGSTATE(SBRG_BOTTOMLEFTBTN
, 0);
566 NtUserGetScrollBarInfo(HWND hWnd
, LONG idObject
, PSCROLLBARINFO psbi
)
572 DECLARE_RETURN(BOOL
);
573 USER_REFERENCE_ENTRY Ref
;
575 TRACE("Enter NtUserGetScrollBarInfo\n");
576 UserEnterExclusive();
578 Status
= MmCopyFromCaller(&sbi
, psbi
, sizeof(SCROLLBARINFO
));
579 if(!NT_SUCCESS(Status
) || (sbi
.cbSize
!= sizeof(SCROLLBARINFO
)))
581 SetLastNtError(Status
);
585 if(!(Window
= UserGetWindowObject(hWnd
)))
590 UserRefObjectCo(Window
, &Ref
);
591 Ret
= co_IntGetScrollBarInfo(Window
, idObject
, &sbi
);
592 UserDerefObjectCo(Window
);
594 Status
= MmCopyToCaller(psbi
, &sbi
, sizeof(SCROLLBARINFO
));
595 if(!NT_SUCCESS(Status
))
597 SetLastNtError(Status
);
604 TRACE("Leave NtUserGetScrollBarInfo, ret=%i\n",_ret_
);
624 DECLARE_RETURN(BOOL
);
625 USER_REFERENCE_ENTRY Ref
;
627 TRACE("Enter NtUserGetScrollInfo\n");
628 UserEnterExclusive();
630 Status
= MmCopyFromCaller(&psi
.cbSize
, &(lpsi
->cbSize
), sizeof(UINT
));
631 if(!NT_SUCCESS(Status
) ||
632 !((psi
.cbSize
== sizeof(SCROLLINFO
)) || (psi
.cbSize
== sizeof(SCROLLINFO
) - sizeof(psi
.nTrackPos
))))
634 SetLastNtError(Status
);
638 Status
= MmCopyFromCaller(&psi
, lpsi
, sz
);
639 if (!NT_SUCCESS(Status
))
641 SetLastNtError(Status
);
645 if(!(Window
= UserGetWindowObject(hWnd
)))
650 UserRefObjectCo(Window
, &Ref
);
651 Ret
= co_IntGetScrollInfo(Window
, fnBar
, &psi
);
652 UserDerefObjectCo(Window
);
654 Status
= MmCopyToCaller(lpsi
, &psi
, sz
);
655 if(!NT_SUCCESS(Status
))
657 SetLastNtError(Status
);
664 TRACE("Leave NtUserGetScrollInfo, ret=%i\n",_ret_
);
672 NtUserEnableScrollBar(
678 PSCROLLBARINFO InfoV
= NULL
, InfoH
= NULL
;
680 DECLARE_RETURN(BOOL
);
681 USER_REFERENCE_ENTRY Ref
;
683 TRACE("Enter NtUserEnableScrollBar\n");
684 UserEnterExclusive();
686 if(!(Window
= UserGetWindowObject(hWnd
)))
690 UserRefObjectCo(Window
, &Ref
);
692 if(wSBflags
== SB_CTL
)
694 /* FIXME Enable or Disable SB Ctrl*/
695 ERR("Enable Scrollbar SB_CTL\n");
696 InfoV
= IntGetScrollbarInfoFromWindow(Window
, SB_CTL
);
697 Chg
= IntEnableScrollBar(FALSE
, InfoV
,wArrows
);
698 /* Chg? Scrollbar is Refresh in user32/controls/scrollbar.c. */
703 if(wSBflags
!= SB_BOTH
&& !SBID_IS_VALID(wSBflags
))
705 EngSetLastError(ERROR_INVALID_PARAMETER
);
706 ERR("Trying to set scrollinfo for unknown scrollbar type %d", wSBflags
);
710 if(!co_IntCreateScrollBars(Window
))
718 InfoV
= IntGetScrollbarInfoFromWindow(Window
, SB_VERT
);
721 InfoH
= IntGetScrollbarInfoFromWindow(Window
, SB_HORZ
);
724 InfoV
= IntGetScrollbarInfoFromWindow(Window
, SB_VERT
);
731 Chg
= IntEnableScrollBar(FALSE
, InfoV
, wArrows
);
734 Chg
= (IntEnableScrollBar(TRUE
, InfoH
, wArrows
) || Chg
);
736 //if(Chg && (Window->style & WS_VISIBLE))
737 /* FIXME - repaint scrollbars */
743 UserDerefObjectCo(Window
);
745 TRACE("Leave NtUserEnableScrollBar, ret=%i\n",_ret_
);
752 NtUserSetScrollBarInfo(
755 SETSCROLLBARINFO
*info
)
758 SETSCROLLBARINFO Safeinfo
;
763 DECLARE_RETURN(BOOL
);
764 USER_REFERENCE_ENTRY Ref
;
766 TRACE("Enter NtUserSetScrollBarInfo\n");
767 UserEnterExclusive();
769 if(!(Window
= UserGetWindowObject(hWnd
)))
773 UserRefObjectCo(Window
, &Ref
);
775 Obj
= SBOBJ_TO_SBID(idObject
);
776 if(!SBID_IS_VALID(Obj
))
778 EngSetLastError(ERROR_INVALID_PARAMETER
);
779 ERR("Trying to set scrollinfo for unknown scrollbar type %d\n", Obj
);
783 if(!co_IntCreateScrollBars(Window
))
788 Status
= MmCopyFromCaller(&Safeinfo
, info
, sizeof(SETSCROLLBARINFO
));
789 if(!NT_SUCCESS(Status
))
791 SetLastNtError(Status
);
795 sbi
= IntGetScrollbarInfoFromWindow(Window
, Obj
);
796 psi
= IntGetScrollInfoFromWindow(Window
, Obj
);
798 psi
->nTrackPos
= Safeinfo
.nTrackPos
;
799 sbi
->reserved
= Safeinfo
.reserved
;
800 RtlCopyMemory(&sbi
->rgstate
, &Safeinfo
.rgstate
, sizeof(Safeinfo
.rgstate
));
806 UserDerefObjectCo(Window
);
808 TRACE("Leave NtUserSetScrollBarInfo, ret=%i\n",_ret_
);
823 SCROLLINFO ScrollInfo
;
824 DECLARE_RETURN(DWORD
);
825 USER_REFERENCE_ENTRY Ref
;
827 TRACE("Enter NtUserSetScrollInfo\n");
828 UserEnterExclusive();
830 if(!(Window
= UserGetWindowObject(hWnd
)))
834 UserRefObjectCo(Window
, &Ref
);
836 Status
= MmCopyFromCaller(&ScrollInfo
, lpsi
, sizeof(SCROLLINFO
) - sizeof(ScrollInfo
.nTrackPos
));
837 if(!NT_SUCCESS(Status
))
839 SetLastNtError(Status
);
843 RETURN(co_IntSetScrollInfo(Window
, fnBar
, &ScrollInfo
, bRedraw
));
847 UserDerefObjectCo(Window
);
849 TRACE("Leave NtUserSetScrollInfo, ret=%i\n",_ret_
);
855 /* Ported from WINE20020904 (SCROLL_ShowScrollBar) */
857 co_UserShowScrollBar(PWND Wnd
, int wBar
, DWORD bShow
)
859 DWORD Style
, OldStyle
;
872 Style
= WS_HSCROLL
| WS_VSCROLL
;
878 EngSetLastError(ERROR_INVALID_PARAMETER
);
882 if(!co_IntCreateScrollBars(Wnd
))
889 IntUpdateSBInfo(Wnd
, SB_CTL
);
891 co_WinPosShowWindow(Wnd
, bShow
? SW_SHOW
: SW_HIDE
);
895 OldStyle
= Wnd
->style
;
899 Wnd
->style
&= ~Style
;
901 if(Wnd
->style
!= OldStyle
)
903 if(Wnd
->style
& WS_HSCROLL
)
904 IntUpdateSBInfo(Wnd
, SB_HORZ
);
905 if(Wnd
->style
& WS_VSCROLL
)
906 IntUpdateSBInfo(Wnd
, SB_VERT
);
908 if(Wnd
->style
& WS_VISIBLE
)
910 /* Frame has been changed, let the window redraw itself */
911 co_WinPosSetWindowPos(Wnd
, 0, 0, 0, 0, 0, SWP_NOSIZE
| SWP_NOMOVE
|
912 SWP_NOACTIVATE
| SWP_NOZORDER
| SWP_FRAMECHANGED
| SWP_NOSENDCHANGING
);
921 NtUserShowScrollBar(HWND hWnd
, int wBar
, DWORD bShow
)
924 DECLARE_RETURN(DWORD
);
926 USER_REFERENCE_ENTRY Ref
;
928 TRACE("Enter NtUserShowScrollBar\n");
929 UserEnterExclusive();
931 if (!(Window
= UserGetWindowObject(hWnd
)))
936 UserRefObjectCo(Window
, &Ref
);
937 ret
= co_UserShowScrollBar(Window
, wBar
, bShow
);
938 UserDerefObjectCo(Window
);
943 TRACE("Leave NtUserShowScrollBar, ret%i\n",_ret_
);