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);
98 IntReleaseWindowObject(Window
);
106 IntCalculateThumb(PWINDOW_OBJECT Window
, LONG idObject
, PSCROLLBARINFO psbi
, LPSCROLLINFO psi
)
108 INT Thumb
, ThumbBox
, ThumbPos
, cxy
, mx
;
114 Thumb
= UserGetSystemMetrics(SM_CXHSCROLL
);
115 cxy
= psbi
->rcScrollBar
.right
- psbi
->rcScrollBar
.left
;
118 Thumb
= UserGetSystemMetrics(SM_CYVSCROLL
);
119 cxy
= psbi
->rcScrollBar
.bottom
- psbi
->rcScrollBar
.top
;
122 IntGetClientRect (Window
, &ClientRect
);
123 if(Window
->Style
& SBS_VERT
)
125 Thumb
= UserGetSystemMetrics(SM_CYVSCROLL
);
126 cxy
= ClientRect
.bottom
- ClientRect
.top
;
130 Thumb
= UserGetSystemMetrics(SM_CXHSCROLL
);
131 cxy
= ClientRect
.right
- ClientRect
.left
;
139 /* calculate Thumb */
140 if(cxy
<= (2 * Thumb
))
143 psbi
->xyThumbTop
= 0;
144 psbi
->xyThumbBottom
= 0;
149 ThumbBox
= psi
->nPage
? MINTRACKTHUMB
: UserGetSystemMetrics(SM_CXHTHUMB
);
155 ThumbBox
= max(EngMulDiv(cxy
, psi
->nPage
, psi
->nMax
- psi
->nMin
+ 1), ThumbBox
);
160 mx
= psi
->nMax
- max(psi
->nPage
- 1, 0);
162 ThumbPos
= Thumb
+ EngMulDiv(cxy
- ThumbBox
, psi
->nPos
- psi
->nMin
, mx
- psi
->nMin
);
164 ThumbPos
= Thumb
+ ThumbBox
;
167 psbi
->xyThumbTop
= ThumbPos
;
168 psbi
->xyThumbBottom
= ThumbPos
+ ThumbBox
;
172 psbi
->xyThumbTop
= 0;
173 psbi
->xyThumbBottom
= 0;
176 psbi
->dxyLineButton
= Thumb
;
182 IntUpdateSBInfo(PWINDOW_OBJECT Window
, int wBar
)
188 ASSERT(Window
->Scroll
);
190 sbi
= IntGetScrollbarInfoFromWindow(Window
, wBar
);
191 psi
= IntGetScrollInfoFromWindow(Window
, wBar
);
192 IntGetScrollBarRect(Window
, wBar
, &(sbi
->rcScrollBar
));
193 IntCalculateThumb(Window
, wBar
, sbi
, psi
);
197 co_IntGetScrollInfo(PWINDOW_OBJECT Window
, INT nBar
, LPSCROLLINFO lpsi
)
202 if(!SBID_IS_VALID(nBar
))
204 SetLastWin32Error(ERROR_INVALID_PARAMETER
);
205 DPRINT1("Trying to get scrollinfo for unknown scrollbar type %d\n", nBar
);
209 if(!co_IntCreateScrollBars(Window
))
214 psi
= IntGetScrollInfoFromWindow(Window
, nBar
);
216 if (lpsi
->fMask
== SIF_ALL
)
218 Mask
= SIF_PAGE
| SIF_POS
| SIF_RANGE
| SIF_TRACKPOS
;
225 if (0 != (Mask
& SIF_PAGE
))
227 lpsi
->nPage
= psi
->nPage
;
230 if (0 != (Mask
& SIF_POS
))
232 lpsi
->nPos
= psi
->nPos
;
235 if (0 != (Mask
& SIF_RANGE
))
237 lpsi
->nMin
= psi
->nMin
;
238 lpsi
->nMax
= psi
->nMax
;
241 if (0 != (Mask
& SIF_TRACKPOS
))
243 lpsi
->nTrackPos
= psi
->nTrackPos
;
249 static DWORD FASTCALL
250 co_IntSetScrollInfo(PWINDOW_OBJECT Window
, INT nBar
, LPCSCROLLINFO lpsi
, BOOL bRedraw
)
253 * Update the scrollbar state and set action flags according to
254 * what has to be done graphics wise.
260 BOOL bChangeParams
= FALSE
; /* don't show/hide scrollbar if params don't change */
262 if(!SBID_IS_VALID(nBar
))
264 SetLastWin32Error(ERROR_INVALID_PARAMETER
);
265 DPRINT1("Trying to set scrollinfo for unknown scrollbar type %d", nBar
);
269 if(!co_IntCreateScrollBars(Window
))
274 if (lpsi
->cbSize
!= sizeof(SCROLLINFO
) &&
275 lpsi
->cbSize
!= (sizeof(SCROLLINFO
) - sizeof(lpsi
->nTrackPos
)))
277 SetLastWin32Error(ERROR_INVALID_PARAMETER
);
280 if (lpsi
->fMask
& ~(SIF_ALL
| SIF_DISABLENOSCROLL
))
282 SetLastWin32Error(ERROR_INVALID_PARAMETER
);
286 psbi
= IntGetScrollbarInfoFromWindow(Window
, nBar
);
287 Info
= IntGetScrollInfoFromWindow(Window
, nBar
);
289 /* Set the page size */
290 if (0 != (lpsi
->fMask
& SIF_PAGE
))
292 if (Info
->nPage
!= lpsi
->nPage
)
294 Info
->nPage
= lpsi
->nPage
;
295 bChangeParams
= TRUE
;
299 /* Set the scroll pos */
300 if (0 != (lpsi
->fMask
& SIF_POS
))
302 if (Info
->nPos
!= lpsi
->nPos
)
304 Info
->nPos
= lpsi
->nPos
;
308 /* Set the scroll range */
309 if (0 != (lpsi
->fMask
& SIF_RANGE
))
311 /* Invalid range -> range is set to (0,0) */
312 if (lpsi
->nMin
> lpsi
->nMax
||
313 0x80000000 <= (UINT
)(lpsi
->nMax
- lpsi
->nMin
))
317 bChangeParams
= TRUE
;
319 else if (Info
->nMin
!= lpsi
->nMin
|| Info
->nMax
!= lpsi
->nMax
)
321 Info
->nMin
= lpsi
->nMin
;
322 Info
->nMax
= lpsi
->nMax
;
323 bChangeParams
= TRUE
;
327 /* Make sure the page size is valid */
332 else if (Info
->nMax
- Info
->nMin
+ 1 < Info
->nPage
)
334 Info
->nPage
= Info
->nMax
- Info
->nMin
+ 1;
337 /* Make sure the pos is inside the range */
338 if (Info
->nPos
< Info
->nMin
)
340 Info
->nPos
= Info
->nMin
;
342 else if (Info
->nPos
> Info
->nMax
- max(Info
->nPage
- 1, 0))
344 Info
->nPos
= Info
->nMax
- max(Info
->nPage
- 1, 0);
348 * Don't change the scrollbar state if SetScrollInfo is just called
349 * with SIF_DISABLENOSCROLL
351 if (0 == (lpsi
->fMask
& SIF_ALL
))
356 /* Check if the scrollbar should be hidden or disabled */
357 if (0 != (lpsi
->fMask
& (SIF_RANGE
| SIF_PAGE
| SIF_DISABLENOSCROLL
)))
359 if (Info
->nMin
>= (int)(Info
->nMax
- max(Info
->nPage
- 1, 0)))
361 /* Hide or disable scroll-bar */
362 if (0 != (lpsi
->fMask
& SIF_DISABLENOSCROLL
))
364 /* new_flags = ESB_DISABLE_BOTH;*/
366 else if ((nBar
!= SB_CTL
) && bChangeParams
)
368 co_UserShowScrollBar(Window
->Self
, nBar
, FALSE
);
372 else /* Show and enable scroll-bar */
375 if ((nBar
!= SB_CTL
) && bChangeParams
)
377 co_UserShowScrollBar(Window
->Self
, nBar
, TRUE
);
382 if (infoPtr
->flags
!= new_flags
) /* check arrow flags */
384 infoPtr
->flags
= new_flags
;
385 *Action
|= SA_SSI_REPAINT_ARROWS
;
392 RECT UpdateRect
= psbi
->rcScrollBar
;
393 UpdateRect
.left
-= Window
->ClientRect
.left
- Window
->WindowRect
.left
;
394 UpdateRect
.right
-= Window
->ClientRect
.left
- Window
->WindowRect
.left
;
395 UpdateRect
.top
-= Window
->ClientRect
.top
- Window
->WindowRect
.top
;
396 UpdateRect
.bottom
-= Window
->ClientRect
.top
- Window
->WindowRect
.top
;
397 co_UserRedrawWindow(Window
, &UpdateRect
, 0, RDW_INVALIDATE
| RDW_FRAME
);
400 /* Return current position */
405 co_IntGetScrollBarInfo(PWINDOW_OBJECT Window
, LONG idObject
, PSCROLLBARINFO psbi
)
411 Bar
= SBOBJ_TO_SBID(idObject
);
413 if(!SBID_IS_VALID(Bar
))
415 SetLastWin32Error(ERROR_INVALID_PARAMETER
);
416 DPRINT1("Trying to get scrollinfo for unknown scrollbar type %d\n", Bar
);
420 if(!co_IntCreateScrollBars(Window
))
425 sbi
= IntGetScrollbarInfoFromWindow(Window
, Bar
);
426 psi
= IntGetScrollInfoFromWindow(Window
, Bar
);
428 IntGetScrollBarRect(Window
, Bar
, &(sbi
->rcScrollBar
));
429 IntCalculateThumb(Window
, Bar
, sbi
, psi
);
431 RtlCopyMemory(psbi
, sbi
, sizeof(SCROLLBARINFO
));
437 co_IntCreateScrollBars(PWINDOW_OBJECT Window
)
447 /* no need to create it anymore */
451 /* allocate memory for all scrollbars (HORZ, VERT, CONTROL) */
452 Size
= 3 * (sizeof(WINDOW_SCROLLINFO
));
453 if(!(Window
->Scroll
= ExAllocatePoolWithTag(PagedPool
, Size
, TAG_SBARINFO
)))
455 DPRINT1("Unable to allocate memory for scrollbar information for window 0x%x\n", Window
->Self
);
459 RtlZeroMemory(Window
->Scroll
, Size
);
461 Result
= co_WinPosGetNonClientSize(Window
->Self
,
463 &Window
->ClientRect
);
465 for(s
= SB_HORZ
; s
<= SB_VERT
; s
++)
467 psbi
= IntGetScrollbarInfoFromWindow(Window
, s
);
468 psbi
->cbSize
= sizeof(SCROLLBARINFO
);
469 for (i
= 0; i
< CCHILDREN_SCROLLBAR
+ 1; i
++)
470 psbi
->rgstate
[i
] = 0;
472 psi
= IntGetScrollInfoFromWindow(Window
, s
);
473 psi
->cbSize
= sizeof(LPSCROLLINFO
);
476 IntGetScrollBarRect(Window
, s
, &(psbi
->rcScrollBar
));
477 IntCalculateThumb(Window
, s
, psbi
, psi
);
484 IntDestroyScrollBars(PWINDOW_OBJECT Window
)
488 ExFreePool(Window
->Scroll
);
489 Window
->Scroll
= NULL
;
496 IntEnableScrollBar(BOOL Horz
, PSCROLLBARINFO Info
, UINT wArrows
)
501 case ESB_DISABLE_BOTH
:
502 CHANGERGSTATE(SBRG_TOPRIGHTBTN
, STATE_SYSTEM_UNAVAILABLE
);
503 CHANGERGSTATE(SBRG_BOTTOMLEFTBTN
, STATE_SYSTEM_UNAVAILABLE
);
505 case ESB_DISABLE_RTDN
:
508 CHANGERGSTATE(SBRG_BOTTOMLEFTBTN
, STATE_SYSTEM_UNAVAILABLE
);
512 CHANGERGSTATE(SBRG_TOPRIGHTBTN
, STATE_SYSTEM_UNAVAILABLE
);
515 case ESB_DISABLE_LTUP
:
518 CHANGERGSTATE(SBRG_TOPRIGHTBTN
, STATE_SYSTEM_UNAVAILABLE
);
522 CHANGERGSTATE(SBRG_BOTTOMLEFTBTN
, STATE_SYSTEM_UNAVAILABLE
);
525 case ESB_ENABLE_BOTH
:
526 CHANGERGSTATE(SBRG_TOPRIGHTBTN
, 0);
527 CHANGERGSTATE(SBRG_BOTTOMLEFTBTN
, 0);
536 NtUserGetScrollBarInfo(HWND hWnd
, LONG idObject
, PSCROLLBARINFO psbi
)
540 PWINDOW_OBJECT Window
;
542 DECLARE_RETURN(BOOL
);
544 DPRINT("Enter NtUserGetScrollBarInfo\n");
545 UserEnterExclusive();
547 Status
= MmCopyFromCaller(&sbi
, psbi
, sizeof(SCROLLBARINFO
));
548 if(!NT_SUCCESS(Status
) || (sbi
.cbSize
!= sizeof(SCROLLBARINFO
)))
550 SetLastNtError(Status
);
554 Window
= IntGetWindowObject(hWnd
);
558 SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE
);
562 Ret
= co_IntGetScrollBarInfo(Window
, idObject
, &sbi
);
564 Status
= MmCopyToCaller(psbi
, &sbi
, sizeof(SCROLLBARINFO
));
565 if(!NT_SUCCESS(Status
))
567 SetLastNtError(Status
);
570 IntReleaseWindowObject(Window
);
574 DPRINT("Leave NtUserGetScrollBarInfo, ret=%i\n",_ret_
);
583 NtUserGetScrollInfo(HWND hwnd
, int fnBar
, LPSCROLLINFO lpsi
)
586 PWINDOW_OBJECT Window
;
590 DECLARE_RETURN(BOOL
);
592 DPRINT("Enter NtUserGetScrollInfo\n");
595 Status
= MmCopyFromCaller(&psi
.cbSize
, &(lpsi
->cbSize
), sizeof(UINT
));
596 if(!NT_SUCCESS(Status
) ||
597 !((psi
.cbSize
== sizeof(SCROLLINFO
)) || (psi
.cbSize
== sizeof(SCROLLINFO
) - sizeof(psi
.nTrackPos
))))
599 SetLastNtError(Status
);
603 Status
= MmCopyFromCaller(&psi
, lpsi
, sz
);
604 if (!NT_SUCCESS(Status
))
606 SetLastNtError(Status
);
610 Window
= IntGetWindowObject(hwnd
);
614 SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE
);
618 Ret
= co_IntGetScrollInfo(Window
, fnBar
, &psi
);
620 IntReleaseWindowObject(Window
);
622 Status
= MmCopyToCaller(lpsi
, &psi
, sz
);
623 if(!NT_SUCCESS(Status
))
625 SetLastNtError(Status
);
632 DPRINT("Leave NtUserGetScrollInfo, ret=%i\n",_ret_
);
640 NtUserEnableScrollBar(
645 PWINDOW_OBJECT Window
;
646 PSCROLLBARINFO InfoV
= NULL
, InfoH
= NULL
;
648 DECLARE_RETURN(BOOL
);
650 DPRINT("Enter NtUserEnableScrollBar\n");
651 UserEnterExclusive();
653 Window
= IntGetWindowObject(hWnd
);
657 SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE
);
661 if(wSBflags
== SB_CTL
)
663 /* FIXME Enable or Disable SB Ctrl*/
664 DPRINT1("Enable Scrollbar SB_CTL\n");
665 InfoV
= IntGetScrollbarInfoFromWindow(Window
, SB_CTL
);
666 Chg
= IntEnableScrollBar(FALSE
, InfoV
,wArrows
);
667 /* Chg? Scrollbar is Refresh in user32/controls/scrollbar.c. */
668 IntReleaseWindowObject(Window
);
672 if(wSBflags
!= SB_BOTH
&& !SBID_IS_VALID(wSBflags
))
674 IntReleaseWindowObject(Window
);
675 SetLastWin32Error(ERROR_INVALID_PARAMETER
);
676 DPRINT1("Trying to set scrollinfo for unknown scrollbar type %d", wSBflags
);
680 if(!co_IntCreateScrollBars(Window
))
682 IntReleaseWindowObject(Window
);
689 InfoV
= IntGetScrollbarInfoFromWindow(Window
, SB_VERT
);
692 InfoH
= IntGetScrollbarInfoFromWindow(Window
, SB_HORZ
);
695 InfoV
= IntGetScrollbarInfoFromWindow(Window
, SB_VERT
);
698 IntReleaseWindowObject(Window
);
703 Chg
= IntEnableScrollBar(FALSE
, InfoV
, wArrows
);
706 Chg
= (IntEnableScrollBar(TRUE
, InfoH
, wArrows
) || Chg
);
708 //if(Chg && (Window->Style & WS_VISIBLE))
709 /* FIXME - repaint scrollbars */
711 IntReleaseWindowObject(Window
);
716 DPRINT("Leave NtUserEnableScrollBar, ret=%i\n",_ret_
);
723 NtUserSetScrollBarInfo(
726 SETSCROLLBARINFO
*info
)
728 PWINDOW_OBJECT Window
;
729 SETSCROLLBARINFO Safeinfo
;
734 DECLARE_RETURN(BOOL
);
736 DPRINT("Enter NtUserSetScrollBarInfo\n");
737 UserEnterExclusive();
739 Window
= IntGetWindowObject(hwnd
);
743 SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE
);
747 Obj
= SBOBJ_TO_SBID(idObject
);
748 if(!SBID_IS_VALID(Obj
))
750 IntReleaseWindowObject(Window
);
751 SetLastWin32Error(ERROR_INVALID_PARAMETER
);
752 DPRINT1("Trying to set scrollinfo for unknown scrollbar type %d", Obj
);
756 if(!co_IntCreateScrollBars(Window
))
758 IntReleaseWindowObject(Window
);
762 Status
= MmCopyFromCaller(&Safeinfo
, info
, sizeof(SETSCROLLBARINFO
));
763 if(!NT_SUCCESS(Status
))
765 IntReleaseWindowObject(Window
);
766 SetLastNtError(Status
);
770 sbi
= IntGetScrollbarInfoFromWindow(Window
, Obj
);
771 psi
= IntGetScrollInfoFromWindow(Window
, Obj
);
773 psi
->nTrackPos
= Safeinfo
.nTrackPos
;
774 sbi
->reserved
= Safeinfo
.reserved
;
775 RtlCopyMemory(&sbi
->rgstate
, &Safeinfo
.rgstate
, sizeof(Safeinfo
.rgstate
));
777 IntReleaseWindowObject(Window
);
781 DPRINT("Leave NtUserSetScrollBarInfo, ret=%i\n",_ret_
);
794 PWINDOW_OBJECT Window
;
796 SCROLLINFO ScrollInfo
;
798 DECLARE_RETURN(DWORD
);
800 DPRINT("Enter NtUserSetScrollInfo\n");
801 UserEnterExclusive();
803 Window
= IntGetWindowObject(hwnd
);
807 SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE
);
811 Status
= MmCopyFromCaller(&ScrollInfo
, lpsi
, sizeof(SCROLLINFO
) - sizeof(ScrollInfo
.nTrackPos
));
812 if(!NT_SUCCESS(Status
))
814 IntReleaseWindowObject(Window
);
815 SetLastNtError(Status
);
819 Ret
= co_IntSetScrollInfo(Window
, fnBar
, &ScrollInfo
, bRedraw
);
820 IntReleaseWindowObject(Window
);
825 DPRINT("Leave NtUserSetScrollInfo, ret=%i\n",_ret_
);
831 /* Ported from WINE20020904 (SCROLL_ShowScrollBar) */
833 co_UserShowScrollBar(HWND hWnd
, int wBar
, DWORD bShow
)
835 DWORD Style
, OldStyle
;
836 PWINDOW_OBJECT Window
= IntGetWindowObject(hWnd
);
840 SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE
);
853 Style
= WS_HSCROLL
| WS_VSCROLL
;
859 IntReleaseWindowObject(Window
);
860 SetLastWin32Error(ERROR_INVALID_PARAMETER
);
864 if(!co_IntCreateScrollBars(Window
))
866 IntReleaseWindowObject(Window
);
872 IntUpdateSBInfo(Window
, SB_CTL
);
874 co_WinPosShowWindow(hWnd
, bShow
? SW_SHOW
: SW_HIDE
);
875 IntReleaseWindowObject(Window
);
879 OldStyle
= Window
->Style
;
881 Window
->Style
|= Style
;
883 Window
->Style
&= ~Style
;
885 if(Window
->Style
!= OldStyle
)
887 if(Window
->Style
& WS_HSCROLL
)
888 IntUpdateSBInfo(Window
, SB_HORZ
);
889 if(Window
->Style
& WS_VSCROLL
)
890 IntUpdateSBInfo(Window
, SB_VERT
);
892 if(Window
->Style
& WS_VISIBLE
)
894 /* Frame has been changed, let the window redraw itself */
895 co_WinPosSetWindowPos(hWnd
, 0, 0, 0, 0, 0, SWP_NOSIZE
| SWP_NOMOVE
|
896 SWP_NOACTIVATE
| SWP_NOZORDER
| SWP_FRAMECHANGED
| SWP_NOSENDCHANGING
);
900 IntReleaseWindowObject(Window
);
906 NtUserShowScrollBar(HWND hWnd
, int wBar
, DWORD bShow
)
908 DECLARE_RETURN(DWORD
);
910 DPRINT("Enter NtUserShowScrollBar\n");
911 UserEnterExclusive();
913 RETURN(co_UserShowScrollBar(hWnd
, wBar
, bShow
));
916 DPRINT("Leave NtUserShowScrollBar, ret%i\n",_ret_
);