网站首页  词典首页

请输入您要查询的函数:

 

术语 scrollconsolescreenbuffer
释义 ScrollConsoleScreenBuffer
语法:
C++
BOOL WINAPI ScrollConsoleScreenBuffer(
__in HANDLE hConsoleOutput,
__in const SMALL_RECT *lpScrollRectangle,
__in_opt const SMALL_RECT *lpClipRectangle,
__in COORD dwDestinationOrigin,
__in const CHAR_INFO *lpFill
);
ScrollConsoleScreenBuffer功能
移动块屏幕缓冲区中的数据。这一举措的影响是可以限制指定剪辑矩形,所以控制台以外的剪辑矩形屏幕缓冲区的内容不变。
参数
hConsoleOutput [in]
句柄到控制台屏幕缓冲区。句柄必须有GENERIC_READ访问的权利。有关更多信息,参见控制台缓冲区安全和访问权限。
lpScrollRectangle [in]
一个 SMALL_RECT结构的指针,其成员指定的左上角和右下角的控制台屏幕缓冲区的矩形坐标移动。
lpClipRectangle [中,可选]
一个 SMALL_RECT结构的指针,其成员指定的左上角和右下角的控制台屏幕缓冲区的矩形,这是由滚动影响的坐标。这个指针可以为NULL。
dwDestinationOrigin [in]
一个坐标结构 ,指定左上角的字符对lpScrollRectangle内容的新的位置的角落。
lpFill [in]
一个 CHAR_INFO结构,指定字符指针和颜色属性将用于填补内lpScrollRectangle和lpClipRectangle交集的细胞,这些离开了这一举措的结果为空。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。
备注
ScrollConsoleScreenBuffer副本一个屏幕缓冲区的矩形区域的内容,由lpScrollRectangle参数指定的另一控制台屏幕缓冲区。目标矩形作为其左上角的坐标参数指定的dwDestinationOrigin角落lpScrollRectangle矩形相同的尺寸。对lpScrollRectangle不重叠,这些目标矩形部分填补,性质和颜色属性的lpFill参数指定。
剪辑矩形适用于两个lpScrollRectangle矩形和目标矩形所做的更改。例如,如果剪辑矩形不包括已打算通过lpFill填写的内容区域,该地区原有的内容保持不变。
如果滚动或目标区域以外的控制台屏幕缓冲区的规模扩大,他们是截断。例如,如果lpScrollRectangle是(0,0)和(19,19)所载的地区和dwDestinationOrigin是(10,15),目标矩形是(10,15)和(29,34)所载的地区。但是,如果控制台屏幕缓冲区是50个字符,宽30个字符高,目标矩形是夹在(10,15)和(29,29)。更改控制台屏幕缓冲区还根据lpClipRectangle修剪,如果该参数指定SMALL_RECT结构。如果剪辑矩形是(0,0)和(49,19),只对改变的,在该控制台的屏幕缓冲区地区出现作出规定。
此函数使用任何Unicode字符或8位字符从控制台的当前代码页。控制台的代码页默认最初系统的OEM代码页。要更改控制台的代码页,使用SetConsoleCP或SetConsoleOutputCP功能,或使用chcp处长或节能模式选择=命令。
实例
举例说,一看到滚动屏幕缓冲区的内容。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWincon.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
Unicode和ANSI namesScrollConsoleScreenBufferW(Unicode)和ScrollConsoleScreenBufferA(ANSI)的
参见
CHAR_INFO
控制台函数
COORD
滚动屏幕缓冲区
SetConsoleCP
SetConsoleOutputCP
SetConsoleWindowInfo
SMALL_RECT
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月27日
==英文原文==ScrollConsoleScreenBuffer Function
Moves a block of data in a screen buffer. The effects of the move can be limited by specifying a clipping rectangle, so the contents of the console screen buffer outside the clipping rectangle are unchanged.
Syntax
C++
BOOL WINAPI ScrollConsoleScreenBuffer(
__in HANDLE hConsoleOutput,
__in const SMALL_RECT *lpScrollRectangle,
__in_opt const SMALL_RECT *lpClipRectangle,
__in COORD dwDestinationOrigin,
__in const CHAR_INFO *lpFill
);
Parameters
hConsoleOutput [in]
A handle to the console screen buffer. The handle must have the GENERIC_READ access right. For more information, see Console Buffer Security and Access Rights .
lpScrollRectangle [in]
A pointer to a SMALL_RECT structure whose members specify the upper-left and lower-right coordinates of the console screen buffer rectangle to be moved.
lpClipRectangle [in, optional]
A pointer to a SMALL_RECT structure whose members specify the upper-left and lower-right coordinates of the console screen buffer rectangle that is affected by the scrolling. This pointer can be NULL.
dwDestinationOrigin [in]
A COORD structure that specifies the upper-left corner of the new location of the lpScrollRectangle contents, in characters.
lpFill [in]
A pointer to a CHAR_INFO structure that specifies the character and color attributes to be used in filling the cells within the intersection of lpScrollRectangle and lpClipRectangle that were left empty as a result of the move.
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
ScrollConsoleScreenBuffer copies the contents of a rectangular region of a screen buffer, specified by the lpScrollRectangle parameter, to another area of the console screen buffer. The target rectangle has the same dimensions as the lpScrollRectangle rectangle with its upper-left corner at the coordinates specified by the dwDestinationOrigin parameter. Those parts of lpScrollRectangle that do not overlap with the target rectangle are filled in with the character and color attributes specified by the lpFill parameter.
The clipping rectangle applies to changes made in both the lpScrollRectangle rectangle and the target rectangle. For example, if the clipping rectangle does not include a region that would have been filled by the contents of lpFill, the original contents of the region are left unchanged.
If the scroll or target regions extend beyond the dimensions of the console screen buffer, they are clipped. For example, if lpScrollRectangle is the region contained by (0,0) and (19,19) and dwDestinationOrigin is (10,15), the target rectangle is the region contained by (10,15) and (29,34). However, if the console screen buffer is 50 characters wide and 30 characters high, the target rectangle is clipped to (10,15) and (29,29). Changes to the console screen buffer are also clipped according to lpClipRectangle, if the parameter specifies a SMALL_RECT structure. If the clipping rectangle is specified as (0,0) and (49,19), only the changes that occur in that region of the console screen buffer are made.
This function uses either Unicode characters or 8-bit characters from the console's current code page. The console's code page defaults initially to the system's OEM code page. To change the console's code page, use the SetConsoleCP or SetConsoleOutputCP functions, or use the chcp or mode con cp select= commands.
Examples
For an example, see Scrolling a Screen Buffer's Contents .
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWincon.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
Unicode and ANSI namesScrollConsoleScreenBufferW (Unicode) and ScrollConsoleScreenBufferA (ANSI)
See Also
CHAR_INFO
Console Functions
COORD
Scrolling the Screen Buffer
SetConsoleCP
SetConsoleOutputCP
SetConsoleWindowInfo
SMALL_RECT
Send comments about this topic to Microsoft
Build date: 8/27/2009
==原始网址==http://msdn.microsoft.com/en-us/library/ms685107(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:26:03