Dela via


CScrollView::GetDeviceScrollPosition

Call GetDeviceScrollPosition when you need the current horizontal and vertical positions of the scroll boxes in the scroll bars.

CPoint GetDeviceScrollPosition( ) const;

Return Value

The horizontal and vertical positions (in device units) of the scroll boxes as a CPoint object.

Remarks

This coordinate pair corresponds to the location in the document to which the upper-left corner of the view has been scrolled. This is useful for offsetting mouse-device positions to scroll-view device positions.

GetDeviceScrollPosition returns values in device units. If you want logical units, use GetScrollPosition instead.

Requirements

Header: afxwin.h

See Also

Reference

CScrollView Class

Hierarchy Chart

CScrollView::GetScrollPosition

Other Resources

CScrollView Members