void ShowScrollBar(hwnd, fnBar, fShow) | |||||
HWND hwnd; | /* handle of window with scroll bar | */ | |||
int fnBar; | /* scroll-bar flag, */ | ||||
BOOL fShow; | /* scroll-bar visibility flag | */ |
The ShowScrollBar function shows or hides a scroll bar.
hwnd
Identifies a scroll bar or a window that contains a scroll bar in its nonclient area, depending on the value of the fnBar parameter. If fnBar is SB_CTL, hwnd identifies a scroll bar. If fnBar is SB_HORZ, SB_VERT, or SB_BOTH, hwnd identifies a window that has a scroll bar in its nonclient area.
fnBar
Specifies whether the scroll bar is a control or part of a window's nonclient area. If the scroll bar is part of the nonclient area, fnBar also indicates whether the scroll bar is positioned horizontally, vertically, or both. This parameter can be one of the following values:
Value | Meaning |
SB_BOTH | Specifies the window's horizontal and vertical scroll bars. |
SB_CTL | Specifies that the hwnd parameter identifies a scroll bar control. |
SB_HORZ | Specifies the window's horizontal scroll bar. |
SB_VERT | Specifies the window's vertical scroll bar. |
fShow
Specifies whether the scroll bar is shown or hidden. If this parameter is TRUE, the scroll bar is shown; otherwise, it is hidden.
This function does not return a value.
An application should not call this function to hide a scroll bar while processing a scroll-bar notification message.
GetScrollPos, GetScrollRange, ScrollWindow, SetScrollPos, SetScrollRange