VC++6.0 写的代码太小了符号都看不清 怎么改变字体的大小? 10
2个回答
展开全部
利用CFont类的成员函数,CreateFont()和SetFont()函数,具体可参见MSDN
CFont Seg7Font;
CEditColor m_PressureWnd;
CEditColor m_TemperWnd;
CDC* pDC = GetDC();
Seg7Font.CreateFont(-MulDiv(2,-pDC->GetDeviceCaps(LOGPIXELSY), 6),
0,0,0,FW_NORMAL,0,0,0,ANSI_CHARSET,
OUT_STROKE_PRECIS,CLIP_STROKE_PRECIS,DRAFT_QUALITY,
VARIABLE_PITCH|FF_SWISS,_T("NI7SEG"));
m_PressureWnd.SetFont(&Seg7Font);
m_TemperWnd.SetFont(&Seg7Font);
CharFont.CreateFont(-MulDiv(2,-pDC->GetDeviceCaps(LOGPIXELSY), 6),
0,0,0,FW_NORMAL,0,0,0,ANSI_CHARSET,
OUT_STROKE_PRECIS,CLIP_STROKE_PRECIS,DRAFT_QUALITY,
VARIABLE_PITCH|FF_SWISS,_T("Airial"));
m_StaticP.SetFont(&CharFont);
m_StaticT.SetFont(&CharFont);
m_StaticC.SetFont(&CharFont);
CFont Seg7Font;
CEditColor m_PressureWnd;
CEditColor m_TemperWnd;
CDC* pDC = GetDC();
Seg7Font.CreateFont(-MulDiv(2,-pDC->GetDeviceCaps(LOGPIXELSY), 6),
0,0,0,FW_NORMAL,0,0,0,ANSI_CHARSET,
OUT_STROKE_PRECIS,CLIP_STROKE_PRECIS,DRAFT_QUALITY,
VARIABLE_PITCH|FF_SWISS,_T("NI7SEG"));
m_PressureWnd.SetFont(&Seg7Font);
m_TemperWnd.SetFont(&Seg7Font);
CharFont.CreateFont(-MulDiv(2,-pDC->GetDeviceCaps(LOGPIXELSY), 6),
0,0,0,FW_NORMAL,0,0,0,ANSI_CHARSET,
OUT_STROKE_PRECIS,CLIP_STROKE_PRECIS,DRAFT_QUALITY,
VARIABLE_PITCH|FF_SWISS,_T("Airial"));
m_StaticP.SetFont(&CharFont);
m_StaticT.SetFont(&CharFont);
m_StaticC.SetFont(&CharFont);
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询