Sdílet prostřednictvím


CFont::GetLogFont

Volání této funkce můžete získat jeho kopii LOGFONT strukturu CFont .

int GetLogFont(
   LOGFONT * pLogFont 
);

Parametry

  • pLogFont
    Ukazatel LOGFONT struktury přijímat informace písma.

Vrácená hodnota

Nenulová hodnota, pokud funkce úspěšná, jinak 0.

Příklad

// The code fragment shows how to retrieve a copy of the 
// LOGFONT structure for a currently selected font of a window.

CFont* pFont = pWnd->GetFont();
if (NULL != pFont)
{
   LOGFONT lf;
   pFont->GetLogFont(&lf);
   TRACE(_T("Typeface name of font = %s\n"), lf.lfFaceName);
}

Požadavky

Záhlaví: afxwin.h

Viz také

Referenční dokumentace

Třída CFont

Diagram hierarchie

LOGFONT

GetObject