Compartilhar via


CFontDialog::GetStyleName

Call this function to retrieve the style name of the selected font.

CString GetStyleName( ) const;

Return Value

The style name of the font.

Example

// Get the style name of the selected font, if any.
CFontDialog dlg;
dlg.m_cf.Flags |= CF_USESTYLE;
if (dlg.DoModal() == IDOK)
{
   CString stylename = dlg.GetStyleName();
   TRACE(_T("Style name of the selected font = %s\n"), stylename);
}

Requirements

Header: afxdlgs.h

See Also

Reference

CFontDialog Class

Hierarchy Chart

CFontDialog::GetFaceName

CFontDialog::GetCurrentFont