网站首页  词典首页

请输入您要查询的函数:

 

术语 scrollwindowex
释义 ScrollWindowEx
语法:
int ScrollWindowEx( HWND hWnd,
int dx,
int dy,
const RECT *prcScroll,
const RECT *prcClip,
HRGN hrgnUpdate,
LPRECT prcUpdate,
UINT flags
);
ScrollWindowEx功能
该ScrollWindowEx函数滚动指定窗口的客户区的内容。
参数
hWnd
[in]句柄窗口,客户区进行滚动。
霉素
[in]指定的金额,设备单位,横向滚动。此参数必须是一个负值,滚动到左边。

[in]指定的金额,在设备单位,垂直滚动。此参数必须是一个负值向上滚动。
prcScroll
[in]指向一个RECT结构,指定客户区的部分不可滚动。如果该参数为NULL,则整个客户区域滚动。
prcClip
[in]指向一个RECT结构,其中包含的剪辑矩形坐标。剪辑矩形内,只有设备位的影响。从内到外位滚动矩形的画;位从矩形内到外都无法绘制滚动。此参数可以为null。
hrgnUpdate
[in]句柄是修订,使区域的滚动无效地区。此参数可以为null。
prcUpdate
[out]指向一个RECT结构,它接收的矩形的边界通过滚动无效。此参数可以为null。
旗帜
[in]指定的标志控制滚动。此参数可以是下列值之一。
SW_ERASE
擦除新无效通过发送WM _ ERASEBKGND消息时与SW_INVALIDATE标志指定的窗口地区。
SW_INVALIDATE
无效的hrgnUpdate参数确定后,滚动区域。
SW_SCROLLCHILDREN
卷轴的所有子窗口的矩形相交所指向prcScroll参数。在子窗口的滚动由dx和dy参数指定的像素数。该系统发送WM_MOVE消息发送到所有子窗口的矩形相交prcScroll,即使他们不动。
SW_SMOOTHSCROLL
Windows 98/Me中时,Windows 2000/XP的:滚动使用平滑滚动。使用该标志的部分参数HIWORD说明多少时间,而平滑滚动操作应该采取。
返回值
如果函数成功,返回值是SIMPLEREGION(矩形无效地区),COMPLEXREGION(非矩形区域无效;重叠的矩形),或NULLREGION(无无效地区)。
如果函数失败,返回值是错误。为了获得更多错误信息,调用GetLastError。
备注
如果SW_INVALIDATE和SW_ERASE标志没有指定,ScrollWindowEx不失效是滚动的地区。如果这些标志设置,ScrollWindowEx否定了这一地区。该地区是不会更新,直到应用程序调用UpdateWindow函数,调用RedrawWindow函数(指定RDW_UPDATENOW或RDW_ERASENOW标志),或检索从应用程序队列中WM_PAINT消息。
如果窗口有WS_CLIPCHILDREN样式,返回的地区指定hrgnUpdate和prcUpdate代表了滚动窗口,必须更新,包括子窗口中需要更新的任何地区的总面积。
如果SW_SCROLLCHILDREN标志被指定,系统不会正确更新屏幕,如果一个子窗口部分是滚动。滚动的子窗口外源矩形在于部分也不会消失,不正确在新的目的地重绘。要移动子窗口,不完全在于prcScroll内指定的矩形,使用DeferWindowPos函数。光标定位如果SW_SCROLLCHILDREN标志设置和插入符号矩形相交的滚动矩形。
所有输入和输出坐标(用于prcScroll,prcClip,prcUpdate和hrgnUpdate)被确定为客户坐标,不论窗口有CS_OWNDC或CS_CLASSDC类样式。使用LPtoDP和DPtoLP职能转换和从逻辑坐标,如有必要。
例如
有关示例,请与WM_PAINT消息滚动文字。
功能信息
最低DLL版本 user32.dll
在Winuser.h中HeaderDeclared,头文件:winuser.h
import libraryUser32.lib
最低操作系统Windows 95,Windows NT 3.1
参见
DeferWindowPos,DPtoLP,DPtoLP,RECT器,RedrawWindow,UpdateWindow
==英文原文==ScrollWindowEx Function
The ScrollWindowEx function scrolls the contents of the specified window's client area.
Syntax
int ScrollWindowEx( HWND hWnd,
int dx,
int dy,
const RECT *prcScroll,
const RECT *prcClip,
HRGN hrgnUpdate,
LPRECT prcUpdate,
UINT flags
);
Parameters
hWnd
[in] Handle to the window where the client area is to be scrolled.
dx
[in] Specifies the amount, in device units, of horizontal scrolling. This parameter must be a negative value to scroll to the left.
dy
[in] Specifies the amount, in device units, of vertical scrolling. This parameter must be a negative value to scroll up.
prcScroll
[in] Pointer to a RECT structure that specifies the portion of the client area to be scrolled. If this parameter is NULL, the entire client area is scrolled.
prcClip
[in] Pointer to a RECT structure that contains 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. This parameter may be NULL.
hrgnUpdate
[in] Handle to the region that is modified to hold the region invalidated by scrolling. This parameter may be NULL.
prcUpdate
[out] Pointer to a RECT structure that receives the boundaries of the rectangle invalidated by scrolling. This parameter may be NULL.
flags
[in] Specifies flags that control scrolling. This parameter can be one of the following values.
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. The system sends a WM_MOVE message to all child windows that intersect the prcScroll rectangle, even if they do not move.
SW_SMOOTHSCROLL
Windows 98/Me, Windows 2000/XP: Scrolls using smooth scrolling. Use the HIWORD portion of the flags parameter to indicate how much time the smooth-scrolling operation should take.
Return Value
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 .
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, 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 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.
Example
For an example, see Scrolling Text with the WM_PAINT Message .
Function Information
Minimum DLL Versionuser32.dll
HeaderDeclared in Winuser.h, include Windows.h
Import libraryUser32.lib
Minimum operating systemsWindows 95, Windows NT 3.1
See Also
DeferWindowPos , DPtoLP , DPtoLP , RECT, RedrawWindow , UpdateWindow
==原始网址==http://msdn.microsoft.com/en-us/library/bb787593(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 11:22:37