DrawRotatedTextBoxA

文本, 页面布局

描述

末尾的 A 表示 ANSI(char)DLL 入口点 ActiveX/COM 接口仅提供 Unicode 形式 行为与 DrawRotatedTextBox 相同,字符串参数使用当前 SetAnsiMode 代码页解释

类似于 DrawTextBox 函数,但允许将文本框旋转任意角度

语法

Delphi

Function DLDrawRotatedTextBoxA(InstanceID: Integer; Left, Top, Width, Height, Angle: Double; Text: PAnsiChar; Options: Integer): Integer;

DLL

int DLDrawRotatedTextBoxA(int InstanceID, double Left, double Top, double Width, double Height, double Angle, const char* Text, int Options);

参数

Left文本框左上角的水平坐标
Top文本框左上角的垂直坐标
Width框的宽度
Height框的高度
Angle框绕左上角逆时针旋转的角度,以度为单位
Text要放入框中的文本
Options0 = 居中垂直对齐 1 = 顶部垂直对齐 2 = 底部垂直对齐 3 = 居中垂直对齐,不换行 4 = 顶部垂直对齐,不换行 5 = 底部垂直对齐,不换行

返回值

0Options 参数超出范围,或 Width 参数过小而无法容纳任何文本
Non-zero实际绘制的文本行数