CScrollBar::EnableScrollBar

Enables or disables one or both arrows of a scroll bar.

BOOL EnableScrollBar(
   UINT nArrowFlags = ESB_ENABLE_BOTH 
);

Parameters

  • nArrowFlags
    Specifies whether the scroll arrows are enabled or disabled and which arrows are enabled or disabled. This parameter can be one of the following values:

    • 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

Nonzero if the arrows are enabled or disabled as specified; otherwise 0, which indicates that the arrows are already in the requested state or that an error occurred.

Example

See the example for CScrollBar::SetScrollRange.

Requirements

Header: afxwin.h

See Also

Reference

CScrollBar Class

Hierarchy Chart

CWnd::EnableScrollBar

EnableScrollBar

Other Resources

CScrollBar Members