ExtTextOut

This function draws a character string by using the currently selected font. An optional rectangle may be provided, to be used for clipping, opaquing, or both.

BOOL ExtTextOut(
HDC hdc, 
int X, 
int Y, 
UINT fuOptions, 
const RECT *lprc, 
LPCTSTR lpString, 
UINT cbCount, 
const int *lpDx
); 

Parameters

  • hdc
    [in] Handle to the device context (DC).

  • X
    [in] Specifies the logical x-coordinate of the reference point used to position the string.

  • Y
    [in] Specifies the logical y-coordinate of the reference point used to position the string.

  • fuOptions
    [in] Specifies how to use the application-defined rectangle. This parameter can be a combination of the following values.

    Value Description
    ETO_CLIPPED The text will be clipped to the rectangle.
    ETO_OPAQUE The current background color should be used to fill the rectangle.
  • lprc
    [in] Long pointer to an optional RECT structure that specifies the dimensions of a rectangle that is used for clipping, opaquing, or both.

  • lpString
    [in] Long pointer to the character string to be drawn. The string does not need to be zero-terminated because cbCount specifies the length of the string.

  • cbCount
    [in] Specifies the number of characters in the string.

  • lpDx
    [in] Long pointer to an optional array of values that indicate the distance between origins of adjacent character cells. For example, lpDx[i] logical units separate the origins of character cell i and character cell i + 1.

Return Values

Nonzero indicates that the string is drawn. Zero indicates failure. To get extended error information, call GetLastError.

Remarks

The current text-alignment settings for the specified DC determine how the reference point is used to position the text.

If the lpDx parameter is NULL, the ExtTextOut function uses the default spacing between characters. The character-cell origins and the contents of the array pointed to by the lpDx parameter are given in logical units. A character-cell origin is defined as the upper-left corner of the character cell.

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 the system to use and update the current position each time the application calls ExtTextOut for a specified DC. When this flag is set, the system ignores the X and Y parameters on subsequent ExtTextOut calls.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 1.0 and later Wingdi.h   Mgrast.lib Mgtt.lib

Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

GetLastError, RECT

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.