网站首页  词典首页

请输入您要查询的函数:

 

术语 getconsoletitle
释义 GetConsoleTitle
语法:
C++
DWORD WINAPI GetConsoleTitle(
__out LPTSTR lpConsoleTitle,
__in DWORD nSize
);
GetConsoleTitle功能
检索标题当前控制台窗口。
参数
lpConsoleTitle [out]
一个缓冲区收到一个空结尾的字符串包含标题指针。在将小于64K的所需的缓冲区的总大小。
nSize [in]
缓冲区的大小指向的lpConsoleTitle参数,以字符。
返回值
如果函数成功,返回值是复制到缓冲区的字符串的长度,以字符。
如果缓冲区不够大,存储的标题,返回值为零,而且GetLastError返回ERROR_SUCCESS。
如果函数失败,返回值为零,GetLastError返回错误代码。
备注
要设置控制台窗口中,使用SetConsoleTitle功能的标题。要检索原来的标题字符串,使用GetConsoleOriginalTitle功能。
此函数使用任何Unicode字符或8位字符从控制台的当前代码页。控制台的代码页默认最初系统的OEM代码页。要更改控制台的代码页,使用SetConsoleCP或SetConsoleOutputCP功能,或使用chcp处长或节能模式选择=命令。
实例
有关示例,请参见SetConsoleTitle。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWincon.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
Unicode和ANSI namesGetConsoleTitleW(Unicode)和GetConsoleTitleA(ANSI)的
参见
控制台函数
GetConsoleOriginalTitle
SetConsoleCP
SetConsoleOutputCP
SetConsoleTitle
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月27日
==英文原文==GetConsoleTitle Function
Retrieves the title for the current console window.
Syntax
C++
DWORD WINAPI GetConsoleTitle(
__out LPTSTR lpConsoleTitle,
__in DWORD nSize
);
Parameters
lpConsoleTitle [out]
A pointer to a buffer that receives a null-terminated string containing the title. The total size of the buffer required will be less than 64K.
nSize [in]
The size of the buffer pointed to by the lpConsoleTitle parameter, in characters.
Return Value
If the function succeeds, the return value is the length of the string copied to the buffer, in characters.
If the buffer is not large enough to store the title, the return value is zero and GetLastError returns ERROR_SUCCESS.
If the function fails, the return value is zero and GetLastError returns the error code.
Remarks
To set the title for a console window, use the SetConsoleTitle function. To retrieve the original title string, use the GetConsoleOriginalTitle function.
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 SetConsoleTitle .
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWincon.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
Unicode and ANSI namesGetConsoleTitleW (Unicode) and GetConsoleTitleA (ANSI)
See Also
Console Functions
GetConsoleOriginalTitle
SetConsoleCP
SetConsoleOutputCP
SetConsoleTitle
Send comments about this topic to Microsoft
Build date: 8/27/2009
==原始网址==http://msdn.microsoft.com/en-us/library/ms683174(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:29:51