DrawTextBoxA
Text, Page layout
Description
The trailing A denotes the ANSI (char) DLL entry point; the ActiveX/COM surface exposes only the Unicode form. Behaviour is identical to DrawTextBox and string arguments are interpreted using the current SetAnsiMode code page
This function is similar to the DrawText function, but the text is placed within the bounding box specified. The vertical alignment can be set using the Options parameter, and the horizontal alignment can be set with the SetTextAlign function. The text will be word-wrapped to fit inside the bounding box.
Syntax
Delphi
Function DLDrawTextBoxA(InstanceID: Integer; Left, Top, Width, Height: Double; Text: PAnsiChar; Options: Integer): Integer;
DLL
int DLDrawTextBoxA(int InstanceID, double Left, double Top, double Width, double Height, const char * Text, int Options);
Parameters
| Left | The horizontal co-ordinate of the left edge of the bounding box |
|---|---|
| Top | The vertical co-ordinate of the top edge of the bounding box |
| Width | The width of the bounding box |
| Height | The height of the bounding box |
| Text | The text to draw on the page |
| Options | 0 = Center vertical alignment 1 = Top vertical alignment 2 = Bottom vertical alignment 3 = Center vertical alignment, no wrapping 4 = Top vertical alignment, no wrapping 5 = Bottom vertical alignment, no wrapping |
Return values
| 0 | The Options parameter was out of range, or the Width parameter was too small to contain any text |
|---|---|
| Non-zero | The number of lines of text actually drawn |