术语 | setconsoletextattribute |
释义 | SetConsoleTextAttribute 语法: C++ BOOL WINAPI SetConsoleTextAttribute( __in HANDLE hConsoleOutput, __in WORD wAttributes ); SetConsoleTextAttribute函数 设置写入到控制台或WriteConsole的WriteFile函数,通过了ReadFile或ReadConsole功能赞同或屏幕缓冲区字符的属性。此功能影响函数调用后的文本。 参数 hConsoleOutput [in] 句柄到控制台屏幕缓冲区。句柄必须有GENERIC_READ访问的权利。有关更多信息,参见控制台缓冲区安全和访问权限。 wAttributes [in] 字符属性。 返回值 如果函数成功,返回值为非零。 如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。 备注 要确定当前颜色的屏幕缓冲区的属性,调用GetConsoleScreenBufferInfo功能。 实例 有关示例,请参阅使用高级别输入和输出功能。 要求: 最低支持:client-Windows 2000专业版 最低支持server-Windows 2000服务器 HeaderWincon.h(头文件:winuser.h) LibraryKernel32.lib DLLKernel32.dll 参见 控制台函数 控制台屏幕缓冲区 GetConsoleScreenBufferInfo ReadConsole ReadFile WriteConsole WriteFile 如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com) 生成日期:2009年8月27日 ==英文原文==SetConsoleTextAttribute Function Sets the attributes of characters written to the console screen buffer by the WriteFile or WriteConsole function, or echoed by the ReadFile or ReadConsole function. This function affects text written after the function call. Syntax C++ BOOL WINAPI SetConsoleTextAttribute( __in HANDLE hConsoleOutput, __in WORD wAttributes ); 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 . wAttributes [in] The character attributes . 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 To determine the current color attributes of a screen buffer, call the GetConsoleScreenBufferInfo function. 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 GetConsoleScreenBufferInfo ReadConsole ReadFile WriteConsole WriteFile Send comments about this topic to Microsoft Build date: 8/27/2009 ==原始网址==http://msdn.microsoft.com/en-us/library/ms686047(VS.85).aspx\n |
随便看 |
|
windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。