Freigeben über


CFont::GetLogFont

Call this function to retrieve a copy of the LOGFONT structure for CFont.

int GetLogFont(
   LOGFONT * pLogFont 
);

Parameters

  • pLogFont
    Pointer to the LOGFONT structure to receive the font information.

Return Value

Nonzero if the function succeeds, otherwise 0.

Example

// 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);
}

Requirements

Header: afxwin.h

See Also

Concepts

CFont Class

CFont Members

Hierarchy Chart

LOGFONT

GetObject