网站首页  词典首页

请输入您要查询的函数:

 

术语 setconsoleoutputcp
释义 SetConsoleOutputCP
语法:
C++
BOOL WINAPI SetConsoleOutputCP(
__in UINT wCodePageID
);
SetConsoleOutputCP功能
设置输出代码页的控制台调用进程的相关使用。阿控制台使用其输出代码页转换的字符值的将在控制台窗口中显示图像的各种输出功能写的。
参数
wCodePageID [in]
该标识符的代码页设置。代码页的本地计算机上可用的标识符存储在注册表中以下项下。
HKEY_LOCAL_MACHINE \\系统\\ CurrentControlSet \\
控制\\免入息审查\\ CodePageFor一个标识符列表,请参阅代码页标识符。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。
备注
代码页256字符代码映射到单个字符。不同的代码页包括不同的特殊字符,通常用于语言或语言群体定制。要检索更多信息的代码页,包括它的名字,看到GetCPInfoEx功能。
如果当前的字体是一种固定摊位Unicode字体,SetConsoleOutputCP变化使该字体设置的字形,而不是一个单独的字体加载每次调用时的字符值映射。这会影响到如何扩展字符(ASCII值比127更大)在控制台窗口中显示。但是,如果目前的字体是一种光栅字体,SetConsoleOutputCP不会影响扩展的字符显示。
要确定一个控制台的电流输出代码页,使用GetConsoleOutputCP功能。设置和检索一个控制台的输入代码页,使用SetConsoleCP和GetConsoleCP功能。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWincon.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
参见
控制台代码页
控制台函数
GetConsoleCP
GetConsoleOutputCP
SetConsoleCP
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月27日
==英文原文==SetConsoleOutputCP Function
Sets the output code page used by the console associated with the calling process. A console uses its output code page to translate the character values written by the various output functions into the images displayed in the console window.
Syntax
C++
BOOL WINAPI SetConsoleOutputCP(
__in UINT wCodePageID
);
Parameters
wCodePageID [in]
The identifier of the code page to set. The identifiers of the code pages available on the local computer are stored in the registry under the following key.
HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\
Control\\Nls\\CodePageFor a list of identifiers, see Code Page Identifiers .
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
A code page maps 256 character codes to individual characters. Different code pages include different special characters, typically customized for a language or a group of languages. To retrieve more information about a code page, including it's name, see the GetCPInfoEx function.
If the current font is a fixed-pitch Unicode font, SetConsoleOutputCP changes the mapping of the character values into the glyph set of the font, rather than loading a separate font each time it is called. This affects how extended characters (ASCII value greater than 127) are displayed in a console window. However, if the current font is a raster font, SetConsoleOutputCP does not affect how extended characters are displayed.
To determine a console's current output code page, use the GetConsoleOutputCP function. To set and retrieve a console's input code page, use the SetConsoleCP and GetConsoleCP functions.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWincon.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
See Also
Console Code Pages
Console Functions
GetConsoleCP
GetConsoleOutputCP
SetConsoleCP
Send comments about this topic to Microsoft
Build date: 8/27/2009
==原始网址==http://msdn.microsoft.com/en-us/library/ms686036(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 13:24:47