Professional User Interface Suite, Copyright FOSS Software Inc. Help Published with Permission.

The CExtButton class has a OnQueryFont virtual method used to retrieve a font for drawing button text. By default, it is the font of the parent window:

virtual HFONT OnQueryFont()
{
    ASSERT_VALID( this );
    HFONT hFont = NULL;
    CWnd *pParent = GetParent();
    if( pParent != NULL )
    {
        CFont * pFont = pParent->GetFont();
        if( pFont != NULL )
            hFont = (HFONT)pFont->GetSafeHandle();
    }
    return hFont;
}

You can always override this method and change the default font. The following code returns the font stored in the button itself:

virtual HFONT OnQueryFont()
{
    ASSERT_VALID( this );
    HFONT hFont = NULL;
    CFont * pFont = GetFont();
    if( pFont != NULL )
        hFont = (HFONT)pFont->GetSafeHandle();
    return hFont;
}