Condividi tramite


CFont::GetLogFont

Chiamare la funzione per recuperare una copia della struttura LOGFONT per CFont.

int GetLogFont(
   LOGFONT * pLogFont 
);

Parametri

  • pLogFont
    Puntatore a una struttura LOGFONT per ricevere informazioni di carattere.

Valore restituito

Diverso da zero se la funzione ha esito positivo, altrimenti 0.

Esempio

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

Requisiti

Header: afxwin.h

Vedere anche

Riferimenti

Classe di CFont

Grafico della gerarchia

LOGFONT

GetObject