EnableScrollBar

  BOOL EnableScrollBar(hwnd, fuSBFlags, fuArrowFlags)    
  HWND hwnd; /* handle of window or scroll bar */
  UINT fuSBFlags; /* scroll bar type flag */
  UINT fuArrowFlags; /* scroll bar arrow flag */

The EnableScrollBar function enables or disables one or both arrows of a scroll bar.

Parameters

hwnd

Identifies a window or a scroll-bar control, depending on the value of the fwSBFlags parameter.

fuSBFlags

Specifies the scroll-bar type. This parameter can be one of the following values:

Value Meaning

SB_BOTH Enables or disables the arrows of the horizontal and vertical scroll bars associated with the given window. The hwnd parameter must be the handle of a window.
SB_CTL Identifies the scroll bar as a scroll-bar control. The hwnd parameter must be the handle of a scroll-bar control.
SB_HORZ Enables or disables the arrows of the horizontal scroll bar associated with the given window. The hwnd parameter must be the handle of the window.
SB_VERT Enables or disables the arrows of the vertical scroll bar associated with the given window. The hwnd parameter must be the handle of the window.

fuArrowFlags

Specifies whether the scroll-bar arrows are enabled or disabled, and which arrows are enabled/disabled. This parameter can be one of the following values:

Value Meaning

ESB_ENABLE_BOTH Enables both arrows of a scroll bar.
ESB_DISABLE_LTUP Disables the left arrow of a horizontal scroll bar, or the up arrow of a vertical scroll bar.
ESB_DISABLE_RTDN Disables the right arrow of a horizontal scroll bar, or the down arrow of a vertical scroll bar.
ESB_DISABLE_BOTH Disables both arrows of a scroll bar.

Return Value

The return value is TRUE if the arrows are enabled or disabled as specified. It is FALSE if the arrows are already in the requested state or an error occurs.

See Also

ShowScrollBar