CDC::GetTextFace

Call this member function to copy the typeface name of the current font into a buffer.

int GetTextFace(
   int nCount,
   LPTSTR lpszFacename 
) const;
int GetTextFace(
   CString& rString 
) const;

Parameters

  • nCount
    Specifies the size of the buffer (in bytes). If the typeface name is longer than the number of bytes specified by this parameter, the name is truncated.

  • lpszFacename
    Points to the buffer for the typeface name.

  • rString
    A reference to a CString object.

Return Value

The number of bytes copied to the buffer, not including the terminating null character. It is 0 if an error occurs.

Remarks

The typeface name is copied as a null-terminated string.

Requirements

Header: afxwin.h

See Also

Reference

CDC Class

Hierarchy Chart

CDC::GetTextMetrics

CDC::SetTextAlign

CDC::TextOut

GetTextFace

Other Resources

CDC Members