It works quite nicely and all of the typical controls, like edit, button, list control, static labels, combo boxes, etc. redraw themselves with the larger font when they receive the
message I send to each of them as part of the scaling routine.
On the other hand, the Command Link button (class "Button", style bit
) does not repaint itself with the larger font I pass to it via the
So how do I enlarge the text in a command link button using the windows API/GDI?
I thank you in advance for any answers you may provide.
What I have tried:
m_font.CreateFont(199, 0, 0, 0, FW_BOLD, 0, 0, 0, 0, 0, 0, 0, 0, L"Arial");
::SendMessage(m_try.GetSafeHwnd(), WM_SETFONT, WPARAM(HFONT(m_font)), 0);
::SendMessage(m_try.GetSafeHwnd(), WM_SETTEXT, 0, (LPARAM)L"Command link");
::SendMessage(m_try.GetSafeHwnd(), BCM_SETNOTE, 0, (LPARAM)L"with note");
logFont.lfWeight = FW_BOLD;
logFont.lfHeight = 120;
CFont* big_font = &font2;