Share via


CScrollBar::GetScrollInfo

BOOL GetScrollInfo( LPSCROLLINFO lpScrollInfo**, UINT** nMask );

Return Value

If the message retrieved any values, the return is TRUE. Otherwise, it is FALSE.

Parameters

lpScrollInfo

A pointer to a structure. See the Win32 Programmer’s Reference for more information about this structure.

nMask

Specifies the scroll bar parameters to retrieve. Typical usage, SIF_ALL, specifies a combination of SIF_PAGE, SIF_POS, SIF_TRACKPOS, and SIF_RANGE. See SCROLLINFO for more information on the nMask values.

Remarks

Call this member function to retrieve the information that the SCROLLINFO structure maintains about a scroll bar. GetScrollInfo enables applications to use 32-bit scroll positions.

The structure contains information about a scroll bar, including the minimum and maximum scrolling positions, the page size, and the position of the scroll box (the thumb). See the SCROLLINFO structure topic in the Win32 SDK Programmer’s Reference for more information about changing the structure defaults.

The MFC Windows message handlers that indicate scroll bar position, CWnd::OnHScroll and CWnd::OnVScroll, provide only 16 bits of position data.  GetScrollInfo and SetScrollInfo provide 32 bits of scroll bar position data. Thus, an application can call GetScrollInfo while processing either CWnd::OnHScroll or CWnd::OnVScroll to obtain 32-bit scroll bar position data.

Example

See the example for CWnd::OnHScroll.

CScrollBar OverviewClass MembersHierarchy Chart

See Also   CScrollBar::SetScrollInfo, CWnd::SetScrollInfo, CWnd::SetScrollPos, CWnd::OnVScroll, CWnd::OnHScroll,