网站首页  词典首页

请输入您要查询的函数:

 

术语 getcharwidth
释义 GetCharWidth
语法:
BOOL GetCharWidth(
__in HDC hdc,
__in UINT iFirstChar,
__in UINT iLastChar,
__out LPINT lpBuffer
);
GetCharWidth功能
该GetCharWidth函数检索宽度,在逻辑坐标的连续字符,从目前的字体指定的范围。
注意:此功能仅提供了兼容性与16位的Windows版本。应用程序应该调用GetCharWidth32功能,提供更准确的结果。
参数
hdc [in]
一个句柄,设备上下文。
iFirstChar [in]
在连续字符组的第一个字符。
iLastChar [in]
在连续字符组,最后一个字符,绝不能先于指定的第一个字符。
lpBuffer [out]
阿一个缓冲区,它接收字符宽度指针,在逻辑坐标。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。
备注
GetCharWidth不能用于TrueType字体。要检索的TrueType字体,使用GetCharABCWidths字符宽度。
范围是包容性的,也就是说,返回的宽度包括由iFirstChar和iLastChar参数指定的字符的宽度。
如果字符不存在当前字体,它被分配默认的字符的宽度。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWingdi.h(头文件:winuser.h)
LibraryGdi32.lib
DLLGdi32.dll
Unicode和ANSI namesGetCharWidthW(Unicode)和GetCharWidthA(ANSI)的
参见
字体和文字概述
字体和文本函数
GetCharABCWidths
GetCharABCWidthsFloat
GetCharWidth32
GetCharWidthFloat
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月11日
==英文原文==GetCharWidth Function
The GetCharWidth function retrieves the widths, in logical coordinates, of consecutive characters in a specified range from the current font.
Note This function is provided only for compatibility with 16-bit versions of Windows. Applications should call the GetCharWidth32 function, which provides more accurate results.
Syntax
BOOL GetCharWidth(
__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
GetCharWidth 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.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWingdi.h (include Windows.h)
LibraryGdi32.lib
DLLGdi32.dll
Unicode and ANSI namesGetCharWidthW (Unicode) and GetCharWidthA (ANSI)
See Also
Fonts and Text Overview
Font and Text Functions
GetCharABCWidths
GetCharABCWidthsFloat
GetCharWidth32
GetCharWidthFloat
Send comments about this topic to Microsoft
Build date: 7/11/2009
==原始网址==http://msdn.microsoft.com/en-us/library/dd144861(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:26:27