short Escape(hDC, EXTTEXTOUT, sizeof(EXTTEXT_STRUCT),lpInData, NULL)
This escape provides an efficient way for the application to call the GDI TextOut function when justification, letter spacing, and/or kerning are involved.
This function is provided only for backward compatibility. New applications should use the GDI ExtTextOut function instead.
Parameter | Type/Description |
hDC | HDC Identifies the device context. | |
lpInData | EXTTEXT_STRUCT FAR * Points to an EXTTEXT_STRUCT data structure that specifies the initial position, characters, and character widths of the string. See the following “Comments” section for more information on the EXTTEXT_STRUCT data structure. |
The return value specifies the outcome of the escape. It is 1 if the escape is successful; it is zero if the escape is not successful or not implemented.
The EXTEXT_STRUCT data structure has the following format:
typedef struct {
WORD X;
WORD Y;
WORD FAR *lpText;
WORD FAR *lpWidths;
} EXTTEXT_STRUCT;
This structure has the following fields.
Field | Description |
X | Specifies the x-coordinate of the upper-left corner of the string's starting point. |
Y | Specifies the y-coordinate of the upper-left corner of the string's starting point. |
lpText | Points to an array of cch character codes, where cch is the number of bytes in the string (cch is also the number of words in the width array). |
lpWidths | Points to an array of cch character widths to use when printing the string. The first character appears at (X,Y), the second at (X + lpWidths[0],Y), the third at (X + lpWidths[0] + lpWidths[1],Y), and so on. These character widths are specified in the font units of the currently selected font. (The character widths will always be equal to device units unless the application has enabled relative character widths.) |
The units contained in the width array are specified as font units of the device. |