BOOL 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 the given scroll bar.
hwnd
Identifies a scroll bar control or a window with a standard scroll bar, depending on the value of the fnBar parameter.
fnBar
Specifies the scroll bar(s) to be shown or hidden. This parameter can be one of the following values:
Value | Meaning |
SB_BOTH | ||
Shows or hides a window's standard horizontal and vertical scroll bars. | ||
SB_CTL | ||
Shows or hides a scroll bar control. In this case, the hwnd parameter must be the handle of a scroll bar control. | ||
SB_HORZ | ||
Shows or hides a window's standard horizontal scroll bars. | ||
SB_VERT | ||
Shows or hides a window's standard 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.
The return value is TRUE if the function was successful or FALSE if an error occurs. To obtain extended error information, use the GetLastError function.
While processing a scroll bar message, an application should not call this function to hide a scroll bar.
GetScrollPos, GetScrollRange, ScrollDC, ScrollWindow, SetScrollPos, SetScrollRange