|
Overview |
|
|
|
Group |
|
|
|
Quick Info
Windows NT
| Yes
| Win95
| Yes
| Win32s
| Yes
| Import Library
| user32.lib
| Header File
| winuser.h
| Unicode
| No
| Platform Notes
| None
|
|
|
ScrollWindowEx
The ScrollWindowEx function scrolls the content of the specified window's client area. This
function is similar to the ScrollWindow function, but it has additional features.
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
| );
|
|
Parameters
hWnd
Identifies the window where the client area is to be scrolled.
dx
Specifies the amount, in device units, of horizontal scrolling. This parameter
must be a negative value to scroll to the left.
dy
Specifies the amount, in device units, of vertical scrolling. This parameter
must be a negative value to scroll up.
prcScroll
Points to the RECT structure specifying the portion of the client area to be scrolled. If this
parameter is NULL, the entire client area is scrolled.
prcClip
Points to the RECT structure containing the coordinates of the clipping rectangle. Only device
bits within the clipping rectangle are affected. Bits scrolled from the outside
of the rectangle to the inside are painted; bits scrolled from the inside of
the rectangle to the outside are not painted.
hrgnUpdate
Identifies the region that is modified to hold the region invalidated by
scrolling. This parameter may be NULL.
prcUpdate
Points to the RECT structure receiving the boundaries of the rectangle invalidated by scrolling.
This parameter may be NULL.
flags
Specifies flags that control scrolling. This parameter can be one of the
following values:
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.
|
Return Values
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.
Remarks
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.
See Also
DeferWindowPos, DPtoLP, LPtoDP, RECT, RedrawWindow, ScrollDC, ScrollWindow, UpdateWindow
| Last news from Greatis Software |
 |
|
Nostalgia .Net |
|
.Net is powerful, but not all-powerful, so sometimes we need to use Win32 API for our .Net applications. It's simple enough with Platform Invoke if you have Win32 skill, but we do not always have time to dig the ancient documentation, declare the special types that are compatible with Win32, find the values of the Win32's constants and so on. Nostalgia .Net offers several simple-to-use classes, and components that will allow you to forget about the headache of Win32 and just use the power of Win32 in your application the same way as you use the native. Net classes. More » |
| Recommended software for developers |
 |
|
Ultimate Pack |
|
Component pack for Delphi and C++ Builder that contains runtime form designer, runtime object inspector, print suite and much more for the very special price. More » |
 |
|
Form Designer .Net |
|
Unique runtime form design solution that allows to edit any form in .Net WinForms application at runtime with full source codes for only 300 euro! More » |
 |
|
Print Suite .Net |
|
Print Suite .Net is a set of components for easy printing texts, images and grids from your WinForms applications. Full C# source codes are available More » |
 |
|
Gradient Controls .Net |
|
Gradient Controls .Net offers controls with gradient background feature. Labels, panels and so on... Full C# source codes are available More » |
 |
|
Greatis iGrid |
|
iGrid plots drawing grid right over your desktop, so you can use it everywhere, with any drawing application without any special plugins for different graphic editors. More » |
All the contacts and projectsDmitry Vasiliev (just.dmitry)
Related LinksSoftware for Visual Studio .NET developers Software for Delphi and C++ Builder developers Software for Visual Basic 6 developers Delphi Tips&Tricks MegaDetailed.NET More Online Helps Win32 Programmer's Reference Win32 Multimedia Programmer's Reference OLE Programmer's Reference Microsoft Windows Pen API Programmer's Reference Microsoft Windows Sockets 2 Reference Microsoft Windows Telephony API (TAPI) Programmer's Reference Unix Manual Pages
|