CScrollBar::GetScrollPos

Retrieves the current position of a scroll box.

int GetScrollPos( ) const;

Return Value

Specifies the current position of the scroll box if successful; otherwise 0.

Remarks

The current position is a relative value that depends on the current scrolling range. For example, if the scrolling range is 100 to 200 and the scroll box is in the middle of the bar, the current position is 150.

Example

See the example for CWnd::OnHScroll.

Requirements

Header: afxwin.h

See Also

Reference

CScrollBar Class

Hierarchy Chart

CScrollBar::SetScrollPos

CScrollBar::GetScrollRange

CScrollBar::SetScrollRange

GetScrollPos