This function retrieves the typeface name of the font that is selected into the specified device context (DC).
At a Glance
Header file: | Wingdi.h |
Windows CE versions: | 1.0 or later |
Syntax
int GetTextFace(HDC hdc, int nCount, LPTSTR lpFaceName);
Parameters
hdc
[in] Handle to the device context (DC).
nCount
[in] Specifies the size, in characters, of the buffer.
lpFaceName
[out] Long pointer to the buffer that is to receive the typeface name. If this parameter is NULL, the function returns the number of characters in the name, including the terminating null character.
Return Values
The number of characters copied to the buffer indicates success. Zero indicates failure. To get extended error information, call GetLastError.
Remarks
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.
See Also