LOGFONT logfont;//最好弄成类成员,全局变量,静态成员
CFont *pfont = m_ctrShowMessage.GetFont();
pfont->GetLogFont( &logfont );
logfont.lfHeight =logfont.lfHeight * 1.5;
logfont.lfWidth = logfont.lfWidth * 1.5;
CFont font;
font.CreateFontIndirect(&logfont);
m_ctrShowMessage.SetFont(&font);
------------------------------------------------------------------------
CFont font;
font.Create(...);
CClientDC dc(CEdit);
dc.SelectObject(&font);
----------------------------------------------------------------------------
void CCsdndlg22Dlg::OnButton9()
{
static LOGFONT logfont;//最好弄成类成员,全局变量,静态成员
CFont *pfont = m_ctrShowMessage.GetFont();
pfont->GetLogFont( &logfont );
logfont.lfHeight =logfont.lfHeight * 1.5;
logfont.lfWidth = logfont.lfWidth * 1.5;
CFont font;
font.CreateFontIndirect(&logfont);
m_ctrShowMessage.SetFont(&font);
}
------------------------------------------------------------------------------------
GetDlgItem(IDC_EDIT1);
pEdit-> SetReadOnly(TRUE); // 设置
pEdit-> SetReadOnly(FALSE); // 取消
本篇文章来源于 www.itzhe.cn IT者网站 原文链接:http://www.itzhe.cn/news/20081018/262563.html