当前位置:网站首页>Vs2019-mfc setting edit control and static text font size

Vs2019-mfc setting edit control and static text font size

2022-06-26 08:11:00 Live in the heart of sunshine

One 、 Set up Edit Control and Static Text Font size in

For the above figure , First in OnInitDialog() External declaration instance cfont, m_oFont;

CFont cfont;
CFont m_oFont;

Then put the following contents into BOOL Sale_Reception::OnInitDialog() Inside

// Set up  Static Text  Static text font enlarges 
cfont.CreatePointFont(150, _T(" In black "), NULL);
GetDlgItem(IDC_STATIC)->SetFont(&cfont);

// Set up  edit control  Edit the font size in the box 
m_oFont.CreatePointFont(300, _T("Times New Roman"));  //Times New Roman
m_findmo.SetFont(&m_oFont);

The following results are obtained :

原网站

版权声明
本文为[Live in the heart of sunshine]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202170604409933.html