Export (0) Print
Expand All

CFont::GetLogFont

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

int GetLogFont( 
   LOGFONT * pLogFont  
);

pLogFont

Pointer to the LOGFONT structure to receive the font information.

Nonzero if the function succeeds, otherwise 0.

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

Header: afxwin.h

Community Additions

ADD
Show:
© 2015 Microsoft