The GetTextFace function retrieves the typeface name of the font that is selected into the specified device context.
int GetTextFace(
HDC hdc, // handle to device context
int nCount, // length of buffer receiving typeface name
LPTSTR lpFaceName // pointer to buffer receiving typeface name
);
If the function succeeds, the return value is the number of characters copied to the buffer.
If the function fails, the return value is zero.
Windows NT: To get extended error information, call GetLastError.
The typeface name is copied as a null-terminated character string.
If the name is longer than the number of characters specified by the nCount parameter, the name is truncated.
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Requires version 1.0 or later.
Header: Declared in wingdi.h.
Import Library: Use gdi32.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows NT.
Fonts and Text Overview, Font and Text Functions, GetTextAlign, GetTextColor, GetTextExtentPoint32, GetTextMetrics