GetHTMLTextWidthA

文本、HTML 文本

描述

结尾的 A 表示 ANSI(char)DLL 入口点;ActiveX/COM 接口仅公开 Unicode 形式。其行为与 GetHTMLTextWidth 相同,字符串参数按当前 SetAnsiMode 代码页解释

返回在最大宽度下换行的 HTML 文本块的实际水平尺寸

由 DrawHTMLText 函数确定的宽度。有关受支持 HTML 标签的详细信息,请参阅附录 A

语法

Delphi

Function DLGetHTMLTextWidthA(InstanceID: Integer; MaxWidth: Double; HTMLText: PAnsiChar): Double;

DLL

double DLGetHTMLTextWidthA(int InstanceID, double MaxWidth, const char* HTMLText);

参数

MaxWidth文本将被绘制到的区域宽度
HTMLText要确定宽度的 HTML 文本