Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This function scrolls the content of the specified window's client area.
int ScrollWindowEx( HWND hWnd , int dx , int dy , const RECT * prcScroll , const RECT * prcClip , HRGN hrgnUpdate , LPRECT prcUpdate , UINT flags );
Parameters
Value | Description |
---|---|
SW_ERASE | Erases the newly invalidated region by sending a WM_ERASEBKGND message to the window when specified with the SW_INVALIDATE flag. |
SW_INVALIDATE | Invalidates the region identified by the hrgnUpdateparameter after scrolling. |
SW_SCROLLCHILDREN | Scrolls all child windows that intersect the rectangle pointed to by the prcScrollparameter. The child windows are scrolled by the number of pixels specified by the dx and dy parameters. The system sends a WM_MOVE message to all child windows that intersect the prcScrollrectangle, even if they do not move. |
Return Values
COMPLEXREGION indicates that the region consists of more than one rectangle. ERROR indicates that an error occurred. NULLREGION indicates that the region is empty. SIMPLEREGION indicates that the region is a single rectangle. To get extended error information, call GetLastError.
Remarks
Only one of the dxand dyparameters can be nonzero.
If the SW_INVALIDATE and SW_ERASE flags are not specified, ScrollWindowExdoes not invalidate the area that is scrolled from. If either of these flags is set, ScrollWindowExinvalidates this area. The area is not updated until the application calls the UpdateWindowfunction or retrieves the WM_PAINT message from the application queue.
If the SW_SCROLLCHILDREN flag is specified, the system does not properly update the screen if part of a child window is scrolled. The part of the scrolled child window that lies outside the source rectangle is not erased and is not properly redrawn in its new destination. To move child windows that do not lie completely within the rectangle specified by prcScroll, use the DeferWindowPosfunction. The cursor is repositioned if the SW_SCROLLCHILDREN flag is set and the caret rectangle intersects the scroll rectangle.
If the window has the WS_CLIPCHILDREN style, the returned areas specified by hrgnUpdateand prcUpdaterepresent the total area of the scrolled window that must be updated, including any areas in child windows that need updating.
All input and output coordinates (for prcScroll, prcClip, prcUpdate, and hrgnUpdate) are determined as client coordinates, regardless of whether the window has the CS_OWNDC or CS_CLASSDC class style.
Requirements
Runs on | Versions | Defined in | Include | Link to |
---|---|---|---|---|
Windows CE OS | 1.0 and later | Winuser.h | Coredll.lib, Winmgr.lib |
Note This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.
See Also
DeferWindowPos, GetLastError, RECT, ScrollDC, UpdateWindow