网站首页  词典首页

请输入您要查询的函数:

 

术语 getcharwidth32
释义 GetCharWidth32
语法:
BOOL GetCharWidth32(
__in HDC hdc,
__in UINT iFirstChar,
__in UINT iLastChar,
__out LPINT lpBuffer
);
GetCharWidth32功能
该GetCharWidth32函数检索宽度,在逻辑坐标的连续字符,从目前的字体指定的范围。
参数
hdc [in]
一个句柄,设备上下文。
iFirstChar [in]
在连续字符组的第一个字符。
iLastChar [in]
在连续字符组,最后一个字符,绝不能先于指定的第一个字符。
lpBuffer [out]
阿一个缓冲区,它接收字符宽度指针,在逻辑坐标。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。
备注
GetCharWidth32不能用于TrueType字体。要检索的TrueType字体,使用GetCharABCWidths字符宽度。
范围是包容性的,也就是说,返回的宽度包括由iFirstChar和iLastChar参数指定的字符的宽度。
如果字符不存在当前字体,它被分配默认的字符的宽度。
实例
有关示例,请参见“显示键盘输入”的使用键盘输入。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWingdi.h(头文件:winuser.h)
LibraryGdi32.lib
DLLGdi32.dll
Unicode和ANSI namesGetCharWidth32W(Unicode)和GetCharWidth32A(ANSI)的
参见
字体和文字概述
字体和文本函数
GetCharABCWidths
GetCharABCWidthsFloat
GetCharWidthFloat
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月11日
==英文原文==GetCharWidth32 Function
The GetCharWidth32 function retrieves the widths, in logical coordinates, of consecutive characters in a specified range from the current font.
Syntax
BOOL GetCharWidth32(
__in HDC hdc,
__in UINT iFirstChar,
__in UINT iLastChar,
__out LPINT lpBuffer
);
Parameters
hdc [in]
A handle to the device context.
iFirstChar [in]
The first character in the group of consecutive characters.
iLastChar [in]
The last character in the group of consecutive characters, which must not precede the specified first character.
lpBuffer [out]
A pointer to a buffer that receives the character widths, in logical coordinates.
Return Value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero.
Remarks
GetCharWidth32 cannot be used on TrueType fonts. To retrieve character widths for TrueType fonts, use GetCharABCWidths .
The range is inclusive; that is, the returned widths include the widths of the characters specified by the iFirstChar and iLastChar parameters.
If a character does not exist in the current font, it is assigned the width of the default character.
Examples
For an example, see "Displaying Keyboard Input" in Using Keyboard Input .
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWingdi.h (include Windows.h)
LibraryGdi32.lib
DLLGdi32.dll
Unicode and ANSI namesGetCharWidth32W (Unicode) and GetCharWidth32A (ANSI)
See Also
Fonts and Text Overview
Font and Text Functions
GetCharABCWidths
GetCharABCWidthsFloat
GetCharWidthFloat
Send comments about this topic to Microsoft
Build date: 7/11/2009
==原始网址==http://msdn.microsoft.com/en-us/library/dd144862(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:23:28