GetWrappedTextHeightA
文字, 頁面版面配置
描述
結尾的 A 表示 ANSI(char)DLL 進入點;ActiveX/COM 介面只提供 Unicode 形式。行為與 GetWrappedTextHeight 完全相同,字串參數依目前 SetAnsiMode 的字碼頁解讀
依目前字型與文字大小,計算一段文字換行到指定寬度後的高度。可用 SetBreakString 函式設定斷行分隔符,預設是 CR/LF 成對出現;某些系統上預設可能是 LineFeed
語法
Delphi
Function DLGetWrappedTextHeightA(InstanceID: Integer; Width: Double; Text: PAnsiChar): Double;
DLL
double DLGetWrappedTextHeightA(int InstanceID, double Width, const char * Text);
參數
| Width | 文字換行目標區塊的寬度 |
|---|---|
| Text | The text to wrap |
傳回值
| 傳回文字區塊的高度 |