GetTextCharset

The GetTextCharset function obtains a character-set identifier for the font that is currently selected into a specified device context.

The function call GetTextCharset(hdc) is equivalent to the function call GetTextCharsetInfo(hdc, NULL, 0).

UINT GetTextCharsetInfo(

HDC hdc, // handle to device context
);  

Parameters

hdc

Handle to a device context. The function obtains a character-set identifier for the font that is selected into this device context.

Return Values

If the function succeeds, the return value identifies the character set of the font that is currently selected into the specified device context. The following character-set identifiers are defined:

ANSI_CHARSET

CHINESEBIG5_CHARSET

DEFAULT_CHARSET

GB2312_CHARSET

HANGEUL_CHARSET

OEM_CHARSET

SHIFTJIS_CHARSET

SYMBOL_CHARSET

Windows 95 only:

ARABIC_CHARSET

BALTIC_CHARSET

EASTEUROPE_CHARSET

GREEK_CHARSET

HEBREW_CHARSET

JOHAB_CHARSET

MAC_CHARSET

RUSSIAN_CHARSET

THAI_CHARSET

TURKISH_CHARSET

If the function fails, the return value is DEFAULT_CHARSET.

See Also

GetTextCharsetInfo