hps (HPS) - input
cchText (LONG) - input
This parameter must be greater or equal to -1L.
lpchText (PCH) - input
A carriage-return or line-feed character allways terminates a line. If the length of a line is less than cchText(the string is divided into more than one line) each line is terminated by either of the mentioned characters.
prcl (PRECTL) - in/out
Rectangle within which the text is to be formatted, in world coordinates. Points on the boundary of this rectangle are deemed to be inside the rectangle.
On input, this rectangle is the desired rectangle in which the text is to be drawn.
On output, the height of the rectangle is modified to the actual size needed to draw the given text string. The return value is only of interest in the instance where DT_QUERYEXTENT is set in flCmd.
Note: The value of each field in this structure must be in the range -32 768 through 32 767. The data type WRECT can also be used, if supported by the language.
clrFore (LONG) - input
Ignored if DT_TEXTATTRS is specified.
clrBack (LONG) - input
The background is drawn with the current background mix. The default is BM_LEAVEALONE, that is, clrBack is ignored unless GpiSetBackMix is called.
The background rectangle is the rectangle that bounds the text; it is not the input parameter rectangle.
This parameter is ignored if DT_TEXTATTRS is specified.
flCmd (ULONG) - input
Some of the DT_ flags are mutually exclusive. Only one from each of these groups is significant:
If DT_HALFTONE, DT_ERASERECT, or DT_MNEMONIC is used, the presentation space must be in PU_PELS units.
DT_LEFT
Any number of leading spaces followed by one or more visible characters and terminated by a space, carriage return, or line-feed character.
When calculating whether a particular word fits within the given rectangle, this function does not consider the trailing blanks. Only the length of the visible part of the word is tested against the right edge of the rectangle.
Also, note that this function always tries to draw at least one word, even if that word does not fit in the passed rectangle. This is so that progress is always made when drawing multiline text.
lChars (LONG) - returns
If DT_WORDBREAK is specified, this parameter returns the number of characters displayed. However, if the first word of the string does not fit in the rectangle, this parameter reflects the fact that the entire word is drawn.
If DT_WORDBREAK is not specified, the count returned is the full length of the string regardless of how much fits into the bounding rectangle.