Partager via


CScrollView::ScrollToPosition

Call ScrollToPosition to scroll to a given point in the view.

void ScrollToPosition(
   POINT pt 
);

Parameters

  • pt
    The point to scroll to, in logical units. The x member must be a positive value (greater than or equal to 0, up to the total size of the view). The same is true for the y member when the mapping mode is MM_TEXT. The y member is negative in mapping modes other than MM_TEXT.

Remarks

The view will be scrolled so that this point is at the upper-left corner of the window. This member function must not be called if the view is scaled to fit.

Requirements

Header: afxwin.h

See Also

Reference

CScrollView Class

Hierarchy Chart

CScrollView::GetDeviceScrollPosition

CScrollView::SetScaleToFitSize

CScrollView::SetScrollSizes

Other Resources

CScrollView Members