GetTextWidthA

文字、字型、頁面版面

描述

結尾的 A 表示 ANSI(char)DLL 進入點;ActiveX/COM 介面只提供 Unicode 形式。行為與 GetTextWidth 完全相同,字串參數依目前 SetAnsiMode 的字碼頁解讀

依所選字型與字型大小計算指定文字的寬度

語法

Delphi

Function DLGetTextWidthA(InstanceID: Integer; Text: PAnsiChar): Double;

DLL

double DLGetTextWidthA(int InstanceID, const char * Text);

參數

Text要計算寬度的文字

傳回值

指定文字的寬度