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 ******************************************************************/
18 #define MINTRACKTHUMB 8 /* Minimum size of the rectangle between the arrows */
20 #define SBRG_SCROLLBAR 0 /* the scrollbar itself */
21 #define SBRG_TOPRIGHTBTN 1 /* the top or right button */
22 #define SBRG_PAGEUPRIGHT 2 /* the page up or page right region */
23 #define SBRG_SCROLLBOX 3 /* the scroll box */
24 #define SBRG_PAGEDOWNLEFT 4 /* the page down or page left region */
25 #define SBRG_BOTTOMLEFTBTN 5 /* the bottom or left button */
27 #define CHANGERGSTATE(item, status) \
28 if(Info->rgstate[(item)] != (status)) \
30 Info->rgstate[(item)] = (status);
32 /* FUNCTIONS *****************************************************************/
34 /* Ported from WINE20020904 */
35 /* Compute the scroll bar rectangle, in drawing coordinates (i.e. client coords for SB_CTL, window coords for SB_VERT and
36 * SB_HORZ). 'arrowSize' returns the width or height of an arrow (depending on * the orientation of the scrollbar),
37 * 'thumbSize' returns the size of the thumb, and 'thumbPos' returns the position of the thumb relative to the left or to
38 * the top. Return TRUE if the scrollbar is vertical, FALSE if horizontal.
41 IntGetScrollBarRect (PWND Wnd
, INT nBar
, RECTL
*lprect
)
44 RECTL ClientRect
= Wnd
->rcClient
;
45 RECTL WindowRect
= Wnd
->rcWindow
;
50 lprect
->left
= ClientRect
.left
- WindowRect
.left
;
51 lprect
->top
= ClientRect
.bottom
- WindowRect
.top
;
52 lprect
->right
= ClientRect
.right
- WindowRect
.left
;
53 lprect
->bottom
= lprect
->top
+ UserGetSystemMetrics (SM_CYHSCROLL
);
58 if(Wnd
->ExStyle
& WS_EX_LEFTSCROLLBAR
)
60 lprect
->right
= ClientRect
.left
- WindowRect
.left
;
61 lprect
->left
= lprect
->right
- UserGetSystemMetrics(SM_CXVSCROLL
);
65 lprect
->left
= ClientRect
.right
- WindowRect
.left
;
66 lprect
->right
= lprect
->left
+ UserGetSystemMetrics(SM_CXVSCROLL
);
68 lprect
->top
= ClientRect
.top
- WindowRect
.top
;
69 lprect
->bottom
= ClientRect
.bottom
- WindowRect
.top
;
74 IntGetClientRect (Wnd
, lprect
);
75 vertical
= ((Wnd
->style
& SBS_VERT
) != 0);
86 IntCalculateThumb(PWND Wnd
, LONG idObject
, PSCROLLBARINFO psbi
, LPSCROLLINFO psi
)
88 INT Thumb
, ThumbBox
, ThumbPos
, cxy
, mx
;
94 Thumb
= UserGetSystemMetrics(SM_CXHSCROLL
);
95 cxy
= psbi
->rcScrollBar
.right
- psbi
->rcScrollBar
.left
;
98 Thumb
= UserGetSystemMetrics(SM_CYVSCROLL
);
99 cxy
= psbi
->rcScrollBar
.bottom
- psbi
->rcScrollBar
.top
;
102 IntGetClientRect(Wnd
, &ClientRect
);
103 if(Wnd
->style
& SBS_VERT
)
105 Thumb
= UserGetSystemMetrics(SM_CYVSCROLL
);
106 cxy
= ClientRect
.bottom
- ClientRect
.top
;
110 Thumb
= UserGetSystemMetrics(SM_CXHSCROLL
);
111 cxy
= ClientRect
.right
- ClientRect
.left
;
119 /* calculate Thumb */
120 if(cxy
<= (2 * Thumb
))
123 psbi
->xyThumbTop
= 0;
124 psbi
->xyThumbBottom
= 0;
129 ThumbBox
= psi
->nPage
? MINTRACKTHUMB
: UserGetSystemMetrics(SM_CXHTHUMB
);
135 ThumbBox
= max(EngMulDiv(cxy
, psi
->nPage
, psi
->nMax
- psi
->nMin
+ 1), ThumbBox
);
140 mx
= psi
->nMax
- max(psi
->nPage
- 1, 0);
142 ThumbPos
= Thumb
+ EngMulDiv(cxy
- ThumbBox
, psi
->nPos
- psi
->nMin
, mx
- psi
->nMin
);
144 ThumbPos
= Thumb
+ ThumbBox
;
147 psbi
->xyThumbTop
= ThumbPos
;
148 psbi
->xyThumbBottom
= ThumbPos
+ ThumbBox
;
152 psbi
->xyThumbTop
= 0;
153 psbi
->xyThumbBottom
= 0;
156 psbi
->dxyLineButton
= Thumb
;
162 IntUpdateSBInfo(PWND Window
, int wBar
)
168 ASSERT(Window
->pSBInfoex
);
170 sbi
= IntGetScrollbarInfoFromWindow(Window
, wBar
);
171 psi
= IntGetScrollInfoFromWindow(Window
, wBar
);
172 IntGetScrollBarRect(Window
, wBar
, &(sbi
->rcScrollBar
));
173 IntCalculateThumb(Window
, wBar
, sbi
, psi
);
177 co_IntGetScrollInfo(PWND Window
, INT nBar
, LPSCROLLINFO lpsi
)
182 ASSERT_REFS_CO(Window
);
184 if(!SBID_IS_VALID(nBar
))
186 SetLastWin32Error(ERROR_INVALID_PARAMETER
);
187 DPRINT1("Trying to get scrollinfo for unknown scrollbar type %d\n", nBar
);
191 if(!co_IntCreateScrollBars(Window
))
196 psi
= IntGetScrollInfoFromWindow(Window
, nBar
);
198 if (lpsi
->fMask
== SIF_ALL
)
200 Mask
= SIF_PAGE
| SIF_POS
| SIF_RANGE
| SIF_TRACKPOS
;
207 if (0 != (Mask
& SIF_PAGE
))
209 lpsi
->nPage
= psi
->nPage
;
212 if (0 != (Mask
& SIF_POS
))
214 lpsi
->nPos
= psi
->nPos
;
217 if (0 != (Mask
& SIF_RANGE
))
219 lpsi
->nMin
= psi
->nMin
;
220 lpsi
->nMax
= psi
->nMax
;
223 if (0 != (Mask
& SIF_TRACKPOS
))
225 lpsi
->nTrackPos
= psi
->nTrackPos
;
232 NEWco_IntGetScrollInfo(
239 PSBTRACK pSBTrack
= pWnd
->head
.pti
->pSBTrack
;
241 if (!SBID_IS_VALID(nBar
))
243 SetLastWin32Error(ERROR_INVALID_PARAMETER
);
244 DPRINT1("Trying to get scrollinfo for unknown scrollbar type %d\n", nBar
);
250 if (0 != (Mask
& SIF_PAGE
))
252 lpsi
->nPage
= pSBData
->page
;
255 if (0 != (Mask
& SIF_POS
))
257 lpsi
->nPos
= pSBData
->pos
;
260 if (0 != (Mask
& SIF_RANGE
))
262 lpsi
->nMin
= pSBData
->posMin
;
263 lpsi
->nMax
= pSBData
->posMax
;
266 if (0 != (Mask
& SIF_TRACKPOS
))
269 pSBTrack
->nBar
== nBar
&&
270 pSBTrack
->spwndTrack
== pWnd
)
271 lpsi
->nTrackPos
= pSBTrack
->posNew
;
273 lpsi
->nTrackPos
= pSBData
->pos
;
275 return (Mask
& SIF_ALL
) !=0;
278 static DWORD FASTCALL
279 co_IntSetScrollInfo(PWND Window
, INT nBar
, LPCSCROLLINFO lpsi
, BOOL bRedraw
)
282 * Update the scrollbar state and set action flags according to
283 * what has to be done graphics wise.
289 BOOL bChangeParams
= FALSE
; /* don't show/hide scrollbar if params don't change */
291 ASSERT_REFS_CO(Window
);
293 if(!SBID_IS_VALID(nBar
))
295 SetLastWin32Error(ERROR_INVALID_PARAMETER
);
296 DPRINT1("Trying to set scrollinfo for unknown scrollbar type %d", nBar
);
300 if(!co_IntCreateScrollBars(Window
))
305 if (lpsi
->cbSize
!= sizeof(SCROLLINFO
) &&
306 lpsi
->cbSize
!= (sizeof(SCROLLINFO
) - sizeof(lpsi
->nTrackPos
)))
308 SetLastWin32Error(ERROR_INVALID_PARAMETER
);
311 if (lpsi
->fMask
& ~(SIF_ALL
| SIF_DISABLENOSCROLL
))
313 SetLastWin32Error(ERROR_INVALID_PARAMETER
);
317 psbi
= IntGetScrollbarInfoFromWindow(Window
, nBar
);
318 Info
= IntGetScrollInfoFromWindow(Window
, nBar
);
320 /* Set the page size */
321 if (0 != (lpsi
->fMask
& SIF_PAGE
))
323 if (Info
->nPage
!= lpsi
->nPage
)
325 Info
->nPage
= lpsi
->nPage
;
326 bChangeParams
= TRUE
;
330 /* Set the scroll pos */
331 if (0 != (lpsi
->fMask
& SIF_POS
))
333 if (Info
->nPos
!= lpsi
->nPos
)
335 Info
->nPos
= lpsi
->nPos
;
339 /* Set the scroll range */
340 if (0 != (lpsi
->fMask
& SIF_RANGE
))
342 /* Invalid range -> range is set to (0,0) */
343 if (lpsi
->nMin
> lpsi
->nMax
||
344 0x80000000 <= (UINT
)(lpsi
->nMax
- lpsi
->nMin
))
348 bChangeParams
= TRUE
;
350 else if (Info
->nMin
!= lpsi
->nMin
|| Info
->nMax
!= lpsi
->nMax
)
352 Info
->nMin
= lpsi
->nMin
;
353 Info
->nMax
= lpsi
->nMax
;
354 bChangeParams
= TRUE
;
358 /* Make sure the page size is valid */
359 if (Info
->nMax
- Info
->nMin
+ 1 < Info
->nPage
)
361 Info
->nPage
= Info
->nMax
- Info
->nMin
+ 1;
364 /* Make sure the pos is inside the range */
365 if (Info
->nPos
< Info
->nMin
)
367 Info
->nPos
= Info
->nMin
;
369 else if (Info
->nPos
> Info
->nMax
- max(Info
->nPage
- 1, 0))
371 Info
->nPos
= Info
->nMax
- max(Info
->nPage
- 1, 0);
375 * Don't change the scrollbar state if SetScrollInfo is just called
376 * with SIF_DISABLENOSCROLL
378 if (0 == (lpsi
->fMask
& SIF_ALL
))
383 /* Check if the scrollbar should be hidden or disabled */
384 if (0 != (lpsi
->fMask
& (SIF_RANGE
| SIF_PAGE
| SIF_DISABLENOSCROLL
)))
386 if (Info
->nMin
>= (int)(Info
->nMax
- max(Info
->nPage
- 1, 0)))
388 /* Hide or disable scroll-bar */
389 if (0 != (lpsi
->fMask
& SIF_DISABLENOSCROLL
))
391 /* new_flags = ESB_DISABLE_BOTH;*/
393 else if ((nBar
!= SB_CTL
) && bChangeParams
)
395 co_UserShowScrollBar(Window
, nBar
, FALSE
);
399 else /* Show and enable scroll-bar */
402 if ((nBar
!= SB_CTL
) && bChangeParams
)
404 co_UserShowScrollBar(Window
, nBar
, TRUE
);
409 if (infoPtr
->flags
!= new_flags
) /* check arrow flags */
411 infoPtr
->flags
= new_flags
;
412 *Action
|= SA_SSI_REPAINT_ARROWS
;
420 RECTL UpdateRect
= psbi
->rcScrollBar
;
421 UpdateRect
.left
-= Window
->rcClient
.left
- Window
->rcWindow
.left
;
422 UpdateRect
.right
-= Window
->rcClient
.left
- Window
->rcWindow
.left
;
423 UpdateRect
.top
-= Window
->rcClient
.top
- Window
->rcWindow
.top
;
424 UpdateRect
.bottom
-= Window
->rcClient
.top
- Window
->rcWindow
.top
;
425 co_UserRedrawWindow(Window
, &UpdateRect
, 0, RDW_INVALIDATE
| RDW_FRAME
);
428 /* Return current position */
433 co_IntGetScrollBarInfo(PWND Window
, LONG idObject
, PSCROLLBARINFO psbi
)
439 ASSERT_REFS_CO(Window
);
441 Bar
= SBOBJ_TO_SBID(idObject
);
443 if(!SBID_IS_VALID(Bar
))
445 SetLastWin32Error(ERROR_INVALID_PARAMETER
);
446 DPRINT1("Trying to get scrollinfo for unknown scrollbar type %d\n", Bar
);
450 if(!co_IntCreateScrollBars(Window
))
455 sbi
= IntGetScrollbarInfoFromWindow(Window
, Bar
);
456 psi
= IntGetScrollInfoFromWindow(Window
, Bar
);
458 IntGetScrollBarRect(Window
, Bar
, &(sbi
->rcScrollBar
));
459 IntCalculateThumb(Window
, Bar
, sbi
, psi
);
461 RtlCopyMemory(psbi
, sbi
, sizeof(SCROLLBARINFO
));
467 co_IntCreateScrollBars(PWND Window
)
474 ASSERT_REFS_CO(Window
);
476 if(Window
->pSBInfoex
)
478 /* no need to create it anymore */
482 /* allocate memory for all scrollbars (HORZ, VERT, CONTROL) */
483 Size
= 3 * (sizeof(SBINFOEX
));
484 if(!(Window
->pSBInfoex
= ExAllocatePoolWithTag(PagedPool
, Size
, TAG_SBARINFO
)))
486 DPRINT1("Unable to allocate memory for scrollbar information for window 0x%x\n", Window
->head
.h
);
490 RtlZeroMemory(Window
->pSBInfoex
, Size
);
492 co_WinPosGetNonClientSize(Window
,
496 for(s
= SB_HORZ
; s
<= SB_VERT
; s
++)
498 psbi
= IntGetScrollbarInfoFromWindow(Window
, s
);
499 psbi
->cbSize
= sizeof(SCROLLBARINFO
);
500 for (i
= 0; i
< CCHILDREN_SCROLLBAR
+ 1; i
++)
501 psbi
->rgstate
[i
] = 0;
503 psi
= IntGetScrollInfoFromWindow(Window
, s
);
504 psi
->cbSize
= sizeof(LPSCROLLINFO
);
507 IntGetScrollBarRect(Window
, s
, &(psbi
->rcScrollBar
));
508 IntCalculateThumb(Window
, s
, psbi
, psi
);
515 IntDestroyScrollBars(PWND Window
)
517 if(Window
->pSBInfoex
)
519 ExFreePool(Window
->pSBInfoex
);
520 Window
->pSBInfoex
= NULL
;
527 IntEnableScrollBar(BOOL Horz
, PSCROLLBARINFO Info
, UINT wArrows
)
532 case ESB_DISABLE_BOTH
:
533 CHANGERGSTATE(SBRG_TOPRIGHTBTN
, STATE_SYSTEM_UNAVAILABLE
);
534 CHANGERGSTATE(SBRG_BOTTOMLEFTBTN
, STATE_SYSTEM_UNAVAILABLE
);
536 case ESB_DISABLE_RTDN
:
539 CHANGERGSTATE(SBRG_BOTTOMLEFTBTN
, STATE_SYSTEM_UNAVAILABLE
);
543 CHANGERGSTATE(SBRG_TOPRIGHTBTN
, STATE_SYSTEM_UNAVAILABLE
);
546 case ESB_DISABLE_LTUP
:
549 CHANGERGSTATE(SBRG_TOPRIGHTBTN
, STATE_SYSTEM_UNAVAILABLE
);
553 CHANGERGSTATE(SBRG_BOTTOMLEFTBTN
, STATE_SYSTEM_UNAVAILABLE
);
556 case ESB_ENABLE_BOTH
:
557 CHANGERGSTATE(SBRG_TOPRIGHTBTN
, 0);
558 CHANGERGSTATE(SBRG_BOTTOMLEFTBTN
, 0);
567 NtUserGetScrollBarInfo(HWND hWnd
, LONG idObject
, PSCROLLBARINFO psbi
)
573 DECLARE_RETURN(BOOL
);
574 USER_REFERENCE_ENTRY Ref
;
576 DPRINT("Enter NtUserGetScrollBarInfo\n");
577 UserEnterExclusive();
579 Status
= MmCopyFromCaller(&sbi
, psbi
, sizeof(SCROLLBARINFO
));
580 if(!NT_SUCCESS(Status
) || (sbi
.cbSize
!= sizeof(SCROLLBARINFO
)))
582 SetLastNtError(Status
);
586 if(!(Window
= UserGetWindowObject(hWnd
)))
591 UserRefObjectCo(Window
, &Ref
);
592 Ret
= co_IntGetScrollBarInfo(Window
, idObject
, &sbi
);
593 UserDerefObjectCo(Window
);
595 Status
= MmCopyToCaller(psbi
, &sbi
, sizeof(SCROLLBARINFO
));
596 if(!NT_SUCCESS(Status
))
598 SetLastNtError(Status
);
605 DPRINT("Leave NtUserGetScrollBarInfo, ret=%i\n",_ret_
);
625 DECLARE_RETURN(BOOL
);
626 USER_REFERENCE_ENTRY Ref
;
628 DPRINT("Enter NtUserGetScrollInfo\n");
629 UserEnterExclusive();
631 Status
= MmCopyFromCaller(&psi
.cbSize
, &(lpsi
->cbSize
), sizeof(UINT
));
632 if(!NT_SUCCESS(Status
) ||
633 !((psi
.cbSize
== sizeof(SCROLLINFO
)) || (psi
.cbSize
== sizeof(SCROLLINFO
) - sizeof(psi
.nTrackPos
))))
635 SetLastNtError(Status
);
639 Status
= MmCopyFromCaller(&psi
, lpsi
, sz
);
640 if (!NT_SUCCESS(Status
))
642 SetLastNtError(Status
);
646 if(!(Window
= UserGetWindowObject(hWnd
)))
651 UserRefObjectCo(Window
, &Ref
);
652 Ret
= co_IntGetScrollInfo(Window
, fnBar
, &psi
);
653 UserDerefObjectCo(Window
);
655 Status
= MmCopyToCaller(lpsi
, &psi
, sz
);
656 if(!NT_SUCCESS(Status
))
658 SetLastNtError(Status
);
665 DPRINT("Leave NtUserGetScrollInfo, ret=%i\n",_ret_
);
673 NtUserEnableScrollBar(
679 PSCROLLBARINFO InfoV
= NULL
, InfoH
= NULL
;
681 DECLARE_RETURN(BOOL
);
682 USER_REFERENCE_ENTRY Ref
;
684 DPRINT("Enter NtUserEnableScrollBar\n");
685 UserEnterExclusive();
687 if(!(Window
= UserGetWindowObject(hWnd
)))
691 UserRefObjectCo(Window
, &Ref
);
693 if(wSBflags
== SB_CTL
)
695 /* FIXME Enable or Disable SB Ctrl*/
696 DPRINT1("Enable Scrollbar SB_CTL\n");
697 InfoV
= IntGetScrollbarInfoFromWindow(Window
, SB_CTL
);
698 Chg
= IntEnableScrollBar(FALSE
, InfoV
,wArrows
);
699 /* Chg? Scrollbar is Refresh in user32/controls/scrollbar.c. */
704 if(wSBflags
!= SB_BOTH
&& !SBID_IS_VALID(wSBflags
))
706 SetLastWin32Error(ERROR_INVALID_PARAMETER
);
707 DPRINT1("Trying to set scrollinfo for unknown scrollbar type %d", wSBflags
);
711 if(!co_IntCreateScrollBars(Window
))
719 InfoV
= IntGetScrollbarInfoFromWindow(Window
, SB_VERT
);
722 InfoH
= IntGetScrollbarInfoFromWindow(Window
, SB_HORZ
);
725 InfoV
= IntGetScrollbarInfoFromWindow(Window
, SB_VERT
);
732 Chg
= IntEnableScrollBar(FALSE
, InfoV
, wArrows
);
735 Chg
= (IntEnableScrollBar(TRUE
, InfoH
, wArrows
) || Chg
);
737 //if(Chg && (Window->style & WS_VISIBLE))
738 /* FIXME - repaint scrollbars */
744 UserDerefObjectCo(Window
);
746 DPRINT("Leave NtUserEnableScrollBar, ret=%i\n",_ret_
);
753 NtUserSetScrollBarInfo(
756 SETSCROLLBARINFO
*info
)
759 SETSCROLLBARINFO Safeinfo
;
764 DECLARE_RETURN(BOOL
);
765 USER_REFERENCE_ENTRY Ref
;
767 DPRINT("Enter NtUserSetScrollBarInfo\n");
768 UserEnterExclusive();
770 if(!(Window
= UserGetWindowObject(hWnd
)))
774 UserRefObjectCo(Window
, &Ref
);
776 Obj
= SBOBJ_TO_SBID(idObject
);
777 if(!SBID_IS_VALID(Obj
))
779 SetLastWin32Error(ERROR_INVALID_PARAMETER
);
780 DPRINT1("Trying to set scrollinfo for unknown scrollbar type %d\n", Obj
);
784 if(!co_IntCreateScrollBars(Window
))
789 Status
= MmCopyFromCaller(&Safeinfo
, info
, sizeof(SETSCROLLBARINFO
));
790 if(!NT_SUCCESS(Status
))
792 SetLastNtError(Status
);
796 sbi
= IntGetScrollbarInfoFromWindow(Window
, Obj
);
797 psi
= IntGetScrollInfoFromWindow(Window
, Obj
);
799 psi
->nTrackPos
= Safeinfo
.nTrackPos
;
800 sbi
->reserved
= Safeinfo
.reserved
;
801 RtlCopyMemory(&sbi
->rgstate
, &Safeinfo
.rgstate
, sizeof(Safeinfo
.rgstate
));
807 UserDerefObjectCo(Window
);
809 DPRINT("Leave NtUserSetScrollBarInfo, ret=%i\n",_ret_
);
824 SCROLLINFO ScrollInfo
;
825 DECLARE_RETURN(DWORD
);
826 USER_REFERENCE_ENTRY Ref
;
828 DPRINT("Enter NtUserSetScrollInfo\n");
829 UserEnterExclusive();
831 if(!(Window
= UserGetWindowObject(hWnd
)))
835 UserRefObjectCo(Window
, &Ref
);
837 Status
= MmCopyFromCaller(&ScrollInfo
, lpsi
, sizeof(SCROLLINFO
) - sizeof(ScrollInfo
.nTrackPos
));
838 if(!NT_SUCCESS(Status
))
840 SetLastNtError(Status
);
844 RETURN(co_IntSetScrollInfo(Window
, fnBar
, &ScrollInfo
, bRedraw
));
848 UserDerefObjectCo(Window
);
850 DPRINT("Leave NtUserSetScrollInfo, ret=%i\n",_ret_
);
856 /* Ported from WINE20020904 (SCROLL_ShowScrollBar) */
858 co_UserShowScrollBar(PWND Wnd
, int wBar
, DWORD bShow
)
860 DWORD Style
, OldStyle
;
873 Style
= WS_HSCROLL
| WS_VSCROLL
;
879 SetLastWin32Error(ERROR_INVALID_PARAMETER
);
883 if(!co_IntCreateScrollBars(Wnd
))
890 IntUpdateSBInfo(Wnd
, SB_CTL
);
892 co_WinPosShowWindow(Wnd
, bShow
? SW_SHOW
: SW_HIDE
);
896 OldStyle
= Wnd
->style
;
900 Wnd
->style
&= ~Style
;
902 if(Wnd
->style
!= OldStyle
)
904 if(Wnd
->style
& WS_HSCROLL
)
905 IntUpdateSBInfo(Wnd
, SB_HORZ
);
906 if(Wnd
->style
& WS_VSCROLL
)
907 IntUpdateSBInfo(Wnd
, SB_VERT
);
909 if(Wnd
->style
& WS_VISIBLE
)
911 /* Frame has been changed, let the window redraw itself */
912 co_WinPosSetWindowPos(Wnd
, 0, 0, 0, 0, 0, SWP_NOSIZE
| SWP_NOMOVE
|
913 SWP_NOACTIVATE
| SWP_NOZORDER
| SWP_FRAMECHANGED
| SWP_NOSENDCHANGING
);
922 NtUserShowScrollBar(HWND hWnd
, int wBar
, DWORD bShow
)
925 DECLARE_RETURN(DWORD
);
927 USER_REFERENCE_ENTRY Ref
;
929 DPRINT("Enter NtUserShowScrollBar\n");
930 UserEnterExclusive();
932 if (!(Window
= UserGetWindowObject(hWnd
)))
937 UserRefObjectCo(Window
, &Ref
);
938 ret
= co_UserShowScrollBar(Window
, wBar
, bShow
);
939 UserDerefObjectCo(Window
);
944 DPRINT("Leave NtUserShowScrollBar, ret%i\n",_ret_
);