Figure 2: Using the CGlyph class in an MFC SDI (Single Document Interface) application, where m_glyph is a member variable in the document class and pDoc is a pointer to the document

// m_glyph is a member variable in the document class.
CGlyph m_glyph;
        .
        .
// Realize 'B' (assumes font defined by LOGFONT lf).
pDoc->m_glyph.Realize('B', *pDC, &lf);
        .
        .
// Draw the glyph with (100,100) as top left.
pDoc->m_glyph.Draw(*pDC, 100, 100);