scrollToPosition 参数到底是什么?

解决方案 »

  1.   

    就是滚动的位置啊。
    目标位置里,窗口里显示部分的左上角在实际视图中的坐标位置。
    举个例子,假如你的视图是2000*1000的,ScrollToPosition(POINT(200,100))的作用就是把(200,100)这个点放到窗口的左上角。
      

  2.   

    CScrollView::ScrollToPosition See Also
    CScrollView Overview | Class Members | Hierarchy Chart | CScrollView::GetDeviceScrollPosition | CScrollView::SetScaleToFitSize | CScrollView::SetScrollSizes
    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.