Upgrade to Visual 2017 C++ now Diaglog Box SetFont not working

  • Thread starter Thread starter Visual 2017 dialog box SetFont not working
  • Start date Start date
V

Visual 2017 dialog box SetFont not working

Guest
The following C++ code worked when complied on Visual 2008, but not working on Visual 2017. Please advise.


LOGFONT lf;
CFont m_font;
memset(&lf, 0, sizeof(LOGFONT));
lf.lfHeight = 20;
strcpy(lf.lfFaceName, "Arial");
m_font.CreateFontIndirect(&lf);
GetDlgItem(IDC_STATIC_OPENING_VERSION_NUMBER)->SetFont(&m_font); // a static control

Continue reading...
 
Back
Top