GetTextCharacterExtra

The GetTextCharacterExtra function retrieves the current intercharacter spacing for the specified device context.

int GetTextCharacterExtra(
  HDC hdc   // handle to device context
);
 

Parameters

hdc
Handle to the device context.

Return Values

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

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

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

Remarks

The intercharacter spacing defines the extra space, in logical units along the base line, that the TextOut or ExtTextOut functions add to each character as a line is written. The spacing is used to expand lines of text.

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, ExtTextOut, SetTextCharacterExtra, TextOut