术语 | setconsolecursorposition |
释义 | SetConsoleCursorPosition 语法: C++ BOOL WINAPI SetConsoleCursorPosition( __in HANDLE hConsoleOutput, __in COORD dwCursorPosition ); SetConsoleCursorPosition功能 设置在指定的控制台屏幕缓冲区光标位置。 参数 hConsoleOutput [in] 句柄到控制台屏幕缓冲区。句柄必须有GENERIC_READ访问的权利。有关更多信息,参见控制台缓冲区安全和访问权限。 dwCursorPosition [in] 一个坐标结构 ,它指定新的光标位置,以字符。坐标列和屏幕缓冲区字符单元格的行。坐标必须在控制台的屏幕缓冲区的边界。 返回值 如果函数成功,返回值为非零。 如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。 备注 光标的位置确定,如经有关WriteFile或WriteConsole功能,通过了ReadFile或ReadConsole功能,呼应或书面字符显示。要确定当前光标位置,请使用GetConsoleScreenBufferInfo功能。 如果新的光标位置不属于控制台屏幕缓冲区的窗口边界,窗口起源改革,使光标可见。 实例 有关示例,请参阅使用高级别输入和输出功能。 要求: 最低支持:client-Windows 2000专业版 最低支持server-Windows 2000服务器 HeaderWincon.h(头文件:winuser.h) LibraryKernel32.lib DLLKernel32.dll 参见 控制台函数 控制台屏幕缓冲区 GetConsoleCursorInfo GetConsoleScreenBufferInfo ReadConsole ReadFile SetConsoleCursorInfo WriteConsole WriteFile 如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com) 生成日期:2009年8月27日 ==英文原文==SetConsoleCursorPosition Function Sets the cursor position in the specified console screen buffer. Syntax C++ BOOL WINAPI SetConsoleCursorPosition( __in HANDLE hConsoleOutput, __in COORD dwCursorPosition ); 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 . dwCursorPosition [in] A COORD structure that specifies the new cursor position, in characters. The coordinates are the column and row of a screen buffer character cell. The coordinates must be within the boundaries of the console screen buffer. 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 The cursor position determines where characters written by the WriteFile or WriteConsole function, or echoed by the ReadFile or ReadConsole function, are displayed. To determine the current position of the cursor, use the GetConsoleScreenBufferInfo function. If the new cursor position is not within the boundaries of the console screen buffer's window, the window origin changes to make the cursor visible. Examples For an example, see Using the High-Level Input and Output Functions . Requirements Minimum supported clientWindows 2000 Professional Minimum supported serverWindows 2000 Server HeaderWincon.h (include Windows.h) LibraryKernel32.lib DLLKernel32.dll See Also Console Functions Console Screen Buffers GetConsoleCursorInfo GetConsoleScreenBufferInfo ReadConsole ReadFile SetConsoleCursorInfo WriteConsole WriteFile Send comments about this topic to Microsoft Build date: 8/27/2009 ==原始网址==http://msdn.microsoft.com/en-us/library/ms686025(VS.85).aspx\n |
随便看 |
|
windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。