Share via


GetTextFace

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This function retrieves the typeface name of the font that is selected into the specified device context.

Syntax

int GetTextFace(
  HDC hdc, 
  int nCount, 
  LPTSTR lpFaceName
); 

Parameters

  • hdc
    [in] Handle to the device context (DC).
  • nCount
    [in] Integer that specifies the size, in characters, of the buffer.
  • lpFaceName
    [out] Long pointer to the buffer that receives the typeface name. If this parameter is NULL, the function returns the number of characters in the name, including the terminating null character.

Return Value

The number of characters copied to the buffer indicates success. Zero indicates failure. To get extended error information, call GetLastError.

Remarks

GetTextFace copies the typeface name as a null-terminated character string.

If the name is longer than the number of characters that the nCount parameter specifies, GetTextFace truncates the name.

Requirements

Header windows.h
Library coredll.lib
Windows Embedded CE Windows CE 1.0 and later
Windows Mobile Pocket PC for Windows Mobile Version 5.0 and later, Smartphone for Windows Mobile Version 5.0 and later

See Also

Reference

GetTextColor
GetTextMetrics