CWnd::OnHScroll

Syntax

afx_msg void OnHScroll( UINT nSBCode, UINT nPos, CWnd* pScrollBar );

Parameters

nSBCode

Specifies a scroll-bar code that indicates the user's scrolling request. This parameter can be one of the following values:

Value Description

SB_BOTTOM Scroll to lower right.
SB_ENDSCROLL End scroll.
SB_LINEDOWN Scroll one line down.
SB_LINEUP Scroll one line up.
SB_PAGEDOWN Scroll one page down.
SB_PAGEUP Scroll one page up.
SB_THUMBPOSITION Scroll to the absolute position. The current position is provided in nPos.
SB_TOP Scroll to upper left.

nPos

Specifies the scroll box position if the scroll-bar code is SB_THUMBPOSITION; otherwise, not used.

pScrollBar

If the control is a scroll bar, contains a pointer to the control. If the user clicked a pop-up window's scroll bar, this parameter is not used.

Remarks

Called when the user clicks a window's horizontal scroll bar.

The SB_THUMBTRACK notification code typically is used by applications that give some feedback while the scroll box is being dragged.

If an application scrolls the contents controlled by the scroll bar, it must also reset the position of the scroll box by using the SetScrollPos member function.

This message-handler member function calls the Default member function. Override this member function in your derived class to handle the WM_HSCROLL message.

See Also

CWnd::SetScrollPos, WM_VSCROLL, WM_HSCROLL, CWnd::Default