在WM_TIMER消息函数中处理一下即可,不是很复杂的事情

解决方案 »

  1.   

    我想问一下在sdk中,要滚动窗口内的图象(图象大于窗口)是怎么做的,是不是不断的在原图中定位要显示的部分,再画到窗口里(
      

  2.   

    BOOL ScrollDC(HDC hDC,int dx,int dy,CONST RECT ·IprcScroll,CONST lprcClip,HRGN hrgnUpdateLPRECT IprcUpdate);
    是用于滚动的关键函数吗
      

  3.   

    CDC::ScrollDC
    This method scrolls a rectangle of bits horizontally and vertically. BOOL ScrollDC( 
    int dx, 
    int dy, 
    LPCRECT lpRectScroll, 
    LPCRECT lpRectClip, 
    CRgn* pRgnUpdate, 
    LPRECT lpRectUpdate ); 
    Parameters
    dx 
    The number of horizontal scroll units. 
    dy 
    The number of vertical scroll units. 
    lpRectScroll 
    Pointer to the RECT structure or CRect object that contains the coordinates of the scrolling rectangle. 
    lpRectClip 
    Pointer to the RECT structure or CRect object that contains the coordinates of the clipping rectangle. When this rectangle is smaller than the original one pointed to by lpRectScroll, scrolling occurs only in the smaller rectangle. 
    pRgnUpdate 
    Identifies the region uncovered by the scrolling process. The ScrollDC function defines this region; it is not necessarily a rectangle. 
    lpRectUpdate 
    Pointer to the RECT structure or CRect object that receives the coordinates of the rectangle that bounds the scrolling update region. This is the largest rectangular area that requires repainting. The values in the structure or object when the function returns are in client coordinates, regardless of the mapping mode for the given device context. 
    Return Value
    Nonzero if scrolling is executed; otherwise, it is zero.Res
    If lpRectUpdate is NULL, Windows does not compute the update rectangle. If both pRgnUpdate and lpRectUpdate are NULL, Windows does not compute the update region. If pRgnUpdate is not NULL, Windows assumes that it contains a valid pointer to the region uncovered by the scrolling process, defined by the ScrollDC method. The update region returned in lpRectUpdate can be passed to CWnd::InvalidateRgn if required.An application should use the ScrollWindow method of class CWnd when it is necessary to scroll the entire client area of a window. Otherwise, it should use ScrollDC.
    很显然,可以用来滚动一个矩形的区域,如果滚动一个客户区域的话应使用ScrollWindow
      

  4.   

    是不是啊,readbook是这样做的吗
      

  5.   

    我想看ScrollView的源代吗,我不知道在哪个cpp里呀,怎么办