Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
EnableScrollBar function (winuser.h)
The EnableScrollBar function enables or disables one or both scroll bar arrows.
Syntax
BOOL EnableScrollBar(
[in] HWND hWnd,
[in] UINT wSBflags,
[in] UINT wArrows
);
Parameters
[in] hWnd
Type: HWND
Handle to a window or a scroll bar control, depending on the value of the wSBflags parameter.
[in] wSBflags
Type: UINT
Specifies the scroll bar type. This parameter can be one of the following values.
| Value | Meaning |
|---|---|
|
Enables or disables the arrows on the horizontal and vertical scroll bars associated with the specified window. The hWnd parameter must be the handle to the window. |
|
Indicates that the scroll bar is a scroll bar control. The hWnd must be the handle to the scroll bar control. |
|
Enables or disables the arrows on the horizontal scroll bar associated with the specified window. The hWnd parameter must be the handle to the window. |
|
Enables or disables the arrows on the vertical scroll bar associated with the specified window. The hWnd parameter must be the handle to the window. |
[in] wArrows
Type: UINT
Specifies whether the scroll bar arrows are enabled or disabled and indicates which arrows are enabled or disabled. This parameter can be one of the following values.
| Value | Meaning |
|---|---|
|
Disables both arrows on a scroll bar. |
|
Disables the down arrow on a vertical scroll bar. |
|
Disables the left arrow on a horizontal scroll bar. |
|
Disables the left arrow on a horizontal scroll bar or the up arrow of a vertical scroll bar. |
|
Disables the right arrow on a horizontal scroll bar. |
|
Disables the right arrow on a horizontal scroll bar or the down arrow of a vertical scroll bar. |
|
Disables the up arrow on a vertical scroll bar. |
|
Enables both arrows on a scroll bar. |
Return value
Type: BOOL
If the arrows are enabled or disabled as specified, the return value is nonzero.
If the arrows are already in the requested state or an error occurs, the return value is zero. To get extended error information, call GetLastError.
Requirements
| Requirement | Value |
|---|---|
| Minimum supported client | Windows Vista [desktop apps only] |
| Minimum supported server | Windows Server 2003 [desktop apps only] |
| Target Platform | Windows |
| Header | winuser.h (include Windows.h) |
| Library | User32.lib |
| DLL | User32.dll |
| API set | ext-ms-win-ntuser-misc-l1-2-0 (introduced in Windows 8.1) |
Feedback
Was this page helpful?
