SetTextCharacterExtra

The SetTextCharacterExtra function sets the intercharacter spacing. Intercharacter spacing is added to each character, including break characters, when the system writes a line of text.

int SetTextCharacterExtra(
  HDC hdc,         // handle to device context
  int nCharExtra   // extra-space value
);
 

Parameters

hdc
Handle to the device context.
nCharExtra
Specifies the amount of extra space, in logical units, to be added to each character. If the current mapping mode is not MM_TEXT, the nCharExtra parameter is transformed and rounded to the nearest pixel.

Return Values

If the function succeeds, the return value is the previous intercharacter spacing.

If the function fails, the return value is 0x80000000.

Windows NT: To get extended error information, call GetLastError.

QuickInfo

  Windows NT: Requires version 3.1 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Unsupported.
  Header: Declared in wingdi.h.
  Import Library: Use gdi32.lib.

See Also

Fonts and Text Overview, Font and Text Functions, DrawText, GetTextCharacterExtra, TextOut