BOOL TextOut(hdc, nXStart, nYStart, lpszString, cbString) | |||||
HDC hdc; | /* handle of device context | */ | |||
int nXStart; | /* x-coordinate of starting position | */ | |||
int nYStart; | /* y-coordinate of starting position | */ | |||
LPCTSTR lpszString; | /* address of string | */ | |||
int cbString; | /* number of characters in string | */ |
The TextOut function writes a character string at the specified location, using the currently selected font.
hdc
Identifies the device context.
nXStart
Specifies the logical x-coordinate of the starting point of the string.
nYStart
Specifies the logical y-coordinate of the starting point of the string.
lpszString
Points to the character string to be drawn.
cbString
Specifies the number of characters in the string.
The return value is TRUE if the function was successful, or FALSE if an error occurred. Use the GetLastError function to obtain extended error information.
The interpretation of the reference point depends on the mode set by SetTextAlign.
By default, the current position is not used or updated by this function. However, an application can call the SetTextAlign function with the fMode parameter set to TA_UPDATECP to permit Windows to use and update the current position each time the application calls TextOut for a given device context. When this flag is set, Windows ignores the X and Y parameters on subsequent TextOut calls.
The TextOut function may be used as either a wide-character function (where text arguments must use Unicode) or an ANSI function (where text arguments must use characters from the Windows 3.x character set
SetTextAlign, TabbedTextOut