The ScrollWindowEx function scrolls the content of the specified window’s client area.
int ScrollWindowEx(
HWND hWnd, |
// handle of window to scroll |
int dx, |
// amount of horizontal scrolling |
int dy, |
// amount of vertical scrolling |
CONST RECT *prcScroll, |
// address of structure with scroll rectangle |
CONST RECT *prcClip, |
// address of structure with clip rectangle |
HRGN hrgnUpdate, |
// handle of update region |
LPRECT prcUpdate, |
// address of structure for update rectangle |
UINT flags |
// scrolling flags |
); |
Value |
Meaning |
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 hrgnUpdate parameter after scrolling. |
SW_SCROLLCHILDREN |
Scrolls all child windows that intersect the rectangle pointed to by the prcScroll parameter. The child windows are scrolled by the number of pixels specified by the dx and dy parameters. Windows sends a WM_MOVE message to all child windows that intersect the prcScroll rectangle, even if they do not move. |
If the function succeeds, the return value is SIMPLEREGION (rectangular invalidated region), COMPLEXREGION (nonrectangular invalidated region; overlapping rectangles), or NULLREGION (no invalidated region).
If the function fails, the return value is ERROR. To get extended error information, call GetLastError.
If the SW_INVALIDATE and SW_ERASE flags are not specified, ScrollWindowEx does not invalidate the area that is scrolled from. If either of these flags is set, ScrollWindowEx invalidates this area. The area is not updated until the application calls the UpdateWindow function, calls the RedrawWindow function (specifying the RDW_UPDATENOW or RDW_ERASENOW flag), or retrieves the WM_PAINT message from the application queue.
If the window has the WS_CLIPCHILDREN style, the returned areas specified by hrgnUpdate and prcUpdate represent the total area of the scrolled window that must be updated, including any areas in child windows that need updating.
If the SW_SCROLLCHILDREN flag is specified, Windows 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 DeferWindowPos function. The cursor is repositioned if the SW_SCROLLCHILDREN flag is set and the caret rectangle intersects the scroll rectangle.
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. Use the LPtoDP and DPtoLP functions to convert to and from logical coordinates, if necessary.
DeferWindowPos, DPtoLP, LPtoDP, RECT, RedrawWindow, UpdateWindow
file: /Techref/os/win/api/win32/func/src/f75_6.htm, 7KB, , updated: 2000/4/7 11:19, local time: 2024/11/25 04:51,
18.119.133.206:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://sxlist.com/TECHREF/os/win/api/win32/func/src/f75_6.htm"> ScrollWindowEx</A> |
Did you find what you needed? |
Welcome to sxlist.com!sales, advertizing, & kind contributors just like you! Please don't rip/copy (here's why Copies of the site on CD are available at minimal cost. |
Welcome to sxlist.com! |
.