勇芳软件工作室.汉化:  Fonts and Text > Fonts and Text Functions >

GetCharWidthFloat

Previous pageReturn to chapter overviewNext page

描述

 

GetCharWidthFloat函数从当前字体中检索指定范围内的连续字符的小数宽度。

 

C++ 语法

 

BOOL GetCharWidthFloat(

__in  HDC hdc,

__in  UINT iFirstChar,

__in  UINT iLastChar,

__out PFLOAT pxBuffer

);

 

PowerBASIC 语法

 

FUNCTION GetCharWidthFloatA ( _

BYVAL hdc AS DWORD, _

BYVAL iFirstChar AS DWORD, _

BYVAL iLastChar AS DWORD, _

BYREF pxBuffer AS LONG _

) AS LONG

 

Unicode版本:

 

FUNCTION GetCharWidthFloatW ( _

BYVAL hdc AS DWORD, _

BYVAL iFirstChar AS DWORD, _

BYVAL iLastChar AS DWORD, _

BYREF pxBuffer AS LONG _

) AS LONG

 

参数

 

hdc

 

[in]处理设备上下文。

 

iFirstChar

 

[in]指定连续字符组中的第一个字符。

 

iLastChar

 

[in]指定连续字符组中最后一个字符的代码点。

 

pxBuffer

 

[out]指向以逻辑单位接收字符宽度的缓冲区的指针。

 

返回值

 

如果函数成功,返回值不为零。

 

如果函数失败,返回值为零。

 

备注

 

返回的宽度为32位IEEE浮点格式。(宽度是沿着字符的基线测量的。)

 

如果iFirstChar参数指定字母a,并且iLastChar参数指定字母z,则GetCharWidthFloat检索所有小写字符的宽度。

 

如果当前字体中不存在字符,则会分配默认字符的宽度。

 

Windows 95/98 / Me:Microsoft Layer for Unicode支持GetCharWidthFloatW.

 

引用文件 #INCLUDE Once

 

WinGdi.inc(包括Windows.inc)