CFont::GetLogFont
Appelez cette fonction pour extraire une copie de la structure d' LOGFONT pour CFont.
int GetLogFont(
LOGFONT * pLogFont
);
Paramètres
- pLogFont
Pointeur vers la structure de LOGFONT pour recevoir les informations de police.
Valeur de retour
Une valeur différente de zéro si la fonction réussit, sinon 0.
Exemple
// 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);
}
Configuration requise
Header: afxwin.h