Click to Rate and Give Feedback
MSDN
MSDN Library
User Interface
 GetTextCharsetInfo
International Features
GetTextCharsetInfo

Retrieves information about the character set of the font that is currently selected into a specified device context.

int GetTextCharsetInfo(
  HDC hdc,       
  LPFONTSIGNATURE lpSig,  
  DWORD dwFlags
);

Parameters

hdc
[in] Handle to a device context. The function obtains information about the font that is selected into this device context.
lpSig
[out] Pointer to a FONTSIGNATURE data structure that receives font-signature information.

If a TrueType font is currently selected into the device context, the FONTSIGNATURE structure receives information that identifies the code page and Unicode subranges for which the font provides glyphs.

If a font other than TrueType is currently selected into the device context, the FONTSIGNATURE structure receives zeros. In this case, the application should use the TranslateCharsetInfo function to obtain generic font-signature information for the character set.

The lpSig parameter specifies a null pointer if the application does not require the FONTSIGNATURE information. In this case, the application can also call the GetTextCharset function, which is equivalent to calling GetTextCharsetInfo with lpSig set to NULL.

dwFlags
This parameter is reserved. It must be set to zero.

Return Values

If successful, returns a value identifying the character set of the font currently selected into the specified device context. The following character set identifiers are defined:

ANSI_CHARSET
BALTIC_CHARSET
CHINESEBIG5_CHARSET
DEFAULT_CHARSET
EASTEUROPE_CHARSET
GB2312_CHARSET
GREEK_CHARSET
HANGUL_CHARSET
MAC_CHARSET
OEM_CHARSET
RUSSIAN_CHARSET
SHIFTJIS_CHARSET
SYMBOL_CHARSET
TURKISH_CHARSET
VIETNAMESE_CHARSET
JOHAB_CHARSET
ARABIC_CHARSET
HEBREW_CHARSET
THAI_CHARSET

If the function fails, the return value is DEFAULT_CHARSET.

Requirements

  Windows NT/2000/XP/Vista: Included in Windows NT 3.51 and later.
  Windows 95/98/Me: Included in Windows 95 and later.
  Header: Declared in Wingdi.h; include Windows.h.
  Library: Use Gdi32.lib.

See Also

Unicode and Character Sets , Unicode and Character Set Functions, FONTSIGNATURE, GetTextCharset, TranslateCharsetInfo

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker