|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.|
Scrolls a rectangle of bits horizontally and vertically.
BOOL ScrollDC( int dx, int dy, LPCRECT lpRectScroll, LPCRECT lpRectClip, CRgn* pRgnUpdate, LPRECT lpRectUpdate );
Specifies the number of horizontal scroll units.
Specifies the number of vertical scroll units.
Points to the RECT structure or CRect object that contains the coordinates of the scrolling rectangle.
Points 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.
Identifies the region uncovered by the scrolling process. The ScrollDC function defines this region; it is not necessarily a rectangle.
Points 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.
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 member function). The update region returned in lpRectUpdate can be passed to CWnd::InvalidateRgn if required.
An application should use the ScrollWindow member function of class CWnd when it is necessary to scroll the entire client area of a window. Otherwise, it should use ScrollDC.