网站首页  词典首页

请输入您要查询的函数:

 

术语 scrollwindow
释义 ScrollWindow
语法:
BOOL ScrollWindow( HWND hWnd,
int XAmount,
int YAmount,
const RECT *lpRect,
const RECT *lpClipRect
);
滚动的窗口功能
在滚动的窗口函数滚动指定窗口的客户区的内容。
注意:滚动的窗口函数是为了向后兼容。新的应用程序应该使用ScrollWindowEx功能。
参数
hWnd
[in]句柄窗口,客户区进行滚动。
XAmount
[in]指定的金额,设备单位,横向滚动。如果窗口被滚动有CS_OWNDC或CS_CLASSDC风格,那么这个参数使用逻辑单位,而不是设备单位。此参数必须是一个负值,以滚动的左边窗口的内容。
YAmount
[in]指定的金额,在设备单位,垂直滚动。如果窗口被滚动有CS_OWNDC或CS_CLASSDC风格,那么这个参数使用逻辑单位,而不是设备单位。此参数必须是一个负值滚动窗口的内容了。
lpRect
[in]指向RECT结构指定客户区的部分不可滚动。如果该参数为NULL,则整个客户区域滚动。
lpClipRect
[in]指向RECT结构载有剪辑矩形坐标。剪辑矩形内,只有设备位的影响。从内到外位滚动矩形的画;位从矩形内到外都无法绘制滚动。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。
备注
如果在窗口中插入符号正在滚动,滚动的窗口自动隐藏的插入,以防止它被删除,然后恢复后插入滚动完成。插入符号的位置相应调整。
通过滚动的窗口发现这里不仅重新绘制,但它是在窗口的更新区域相结合。应用程序最终收到WM_PAINT消息,通知它,该地区必须重新绘制。重新绘制的同时滚动的行动,被破获的地区,立即打电话要求滚动的窗口后,在UpdateWindow函数。
如果lpRect参数为NULL,在窗口的所有子窗口是由XAmount和YAmount参数所指定的数额抵销的立场;无效(未上漆)在窗口地区,也抵消。滚动的窗口时更快lpRect为NULL。
如果lpRect不是NULL,在子窗口立场没有改变,在窗口中无效的领域不予抵销。为了防止更新问题时,lpRect不是NULL,调用UpdateWindow重新绘制之前调用滚动的窗口的窗口。
例如
有关示例,请与WM_PAINT消息滚动文字。
功能信息
最低DLL版本 comctl32.dll
在Winuser.h中HeaderDeclared,头文件:winuser.h
import libraryUser32.lib
最低操作系统Windows 95,Windows NT 3.1
参见
RECT器,ScrollDC,ScrollWindowEx,UpdateWindow
==英文原文==ScrollWindow Function
The ScrollWindow function scrolls the contents of the specified window's client area.
Note The ScrollWindow function is provided for backward compatibility. New applications should use the ScrollWindowEx function.
Syntax
BOOL ScrollWindow( HWND hWnd,
int XAmount,
int YAmount,
const RECT *lpRect,
const RECT *lpClipRect
);
Parameters
hWnd
[in] Handle to the window where the client area is to be scrolled.
XAmount
[in] Specifies the amount, in device units, of horizontal scrolling. If the window being scrolled has the CS_OWNDC or CS_CLASSDC style, then this parameter uses logical units rather than device units. This parameter must be a negative value to scroll the content of the window to the left.
YAmount
[in] Specifies the amount, in device units, of vertical scrolling. If the window being scrolled has the CS_OWNDC or CS_CLASSDC style, then this parameter uses logical units rather than device units. This parameter must be a negative value to scroll the content of the window up.
lpRect
[in] Pointer 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.
lpClipRect
[in] Pointer 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.
Return Value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError .
Remarks
If the caret is in the window being scrolled, ScrollWindow automatically hides the caret to prevent it from being erased and then restores the caret after the scrolling is finished. The caret position is adjusted accordingly.
The area uncovered by ScrollWindow is not repainted, but it is combined into the window's update region. The application eventually receives a WM_PAINT message notifying it that the region must be repainted. To repaint the uncovered area at the same time the scrolling is in action, call the UpdateWindow function immediately after calling ScrollWindow.
If the lpRect parameter is NULL, the positions of any child windows in the window are offset by the amount specified by the XAmount and YAmount parameters; invalid (unpainted) areas in the window are also offset. ScrollWindow is faster when lpRect is NULL.
If lpRect is not NULL, the positions of child windows are not changed and invalid areas in the window are not offset. To prevent updating problems when lpRect is not NULL, call UpdateWindow to repaint the window before calling ScrollWindow.
Example
For an example, see Scrolling Text with the WM_PAINT Message .
Function Information
Minimum DLL Versioncomctl32.dll
HeaderDeclared in Winuser.h, include Windows.h
Import libraryUser32.lib
Minimum operating systemsWindows 95, Windows NT 3.1
See Also
RECT, ScrollDC , ScrollWindowEx , UpdateWindow
==原始网址==http://msdn.microsoft.com/en-us/library/bb787591(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:27:38