Hi all,

I'm trying to dinamically change the font of a whole dialog box, without any
success. As far as I undertand it (after many MFC programming years) I
should use CWnd::SetFont(m_pMyFont,TRUE) to set the new font but I only
managed to make it work on child controls.

The code I'm using :

// use m_strFaceName = "Arial"
// and m_FontSize = 12

LOGFONT lf;
memset(&lf, 0, sizeof(lf));

m_pFont = new CFont();

strncpy(lf.lfFaceName, m_strFaceName, 32); lf.lfHeight =
m_FontSize;

m_pFont->CreateFontIndirect(&lf);

CWnd::SetFont(m_pFont, TRUE);

The created CFont is correct (I can use it to draw text in a DC) and using
GetDlgItem(IDOK)->SetFont(m_pFont, TRUE) works well (it changes the font of
the OK button).

I tried to call this code right after the creation of the dialog box without
success. I also tried to call this code from a button message handler (same
thing).

Thanks for your help.

--
More about that : the thing I'm trying to do is to override the resource
specified FONT. When we are using our program on a Japanese system, some
non-japanese resources does not work at all. But since these resources work
well on their base target system, we cannot modify the resource in order to
make them work on a Japanese system.
That's probably a bit strange... But since I did not find anything in the
MSDN library I'm blocked.
--
Emmanuel Deloget
i-magus S.A.