short Escape(hdc, EXTTEXTOUT, sizeof(EXTTEXT_STRUCT),lpInData, NULL)
The EXTTEXTOUT printer escape provides an efficient way for an application to call the graphics device interface (GDI) TextOut function when justification, letter spacing, or kerning is involved.
This function is provided only for backward compatibility. New applications should use the GDI ExtTextOut function instead.
hdc
HDC Identifies the device context.
lpInData
EXTTEXT_STRUCT FAR * Points to an EXTTEXT_STRUCT structure that specifies the initial position, characters, and character widths of the string. For more information about this structure, see the following Comments section.
The return value specifies the outcome of the escape. This value is 1 if the escape is successful. It is zero if the escape is not successful or not implemented.
The EXTTEXT_STRUCT structure has the following form:
struct EXTTEXT_STRUCT {
WORD x;
WORD y;
LPWORD lpText;
LPWORD lpWidths;
};
Following are the members in the EXTTEXT_STRUCT structure:
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 are always 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.