Changed an MFC app to per-monitor DPI aware. On the WM_DPICHANGED
message I wanted to changed the fonts of the CMFCMenuBar to be scaled correctly. So I added:
LOGFONT logfont;
GetGlobalData()->fontRegular.GetLogFont(&logfont);
logfont.lfHeight=g_DPIHelper.ScaleNonClientMetricsFont(logfont.lfHeight);
if (!m_wndMenuBar.SetMenuFont(&logfont)) {
TRACE0("Unable to set menu font\n");
}
I confirmed that logfont.lfHeight went from -11 to -17 in the test case. I confirmed the SetMenuFont()
call returned success. Yet the CMFCMenuBar
font shown on the menu bar is the same size as it was before. What am I missing?
TIA!!