.h里定义字体
CFont editfont;
.cpp中的OnInitDialog()下添加
CFont* ptf=GetDlgItem(IDC_EDIT1)->GetFont();
LOGFONT lf;
ptf->GetLogFont(&lf);
lf.lfHeight=16;//改变字体高度
//strcpy(lf.lfFaceName,隶书);
editfont.CreateFontIndirect(&lf);
GetDlgItem(IDC_EDIT1)->SetFont(&editfont,1);
或
CFontDialog fd;
fd.DoModal();
LOGFONT lf;
fd.GetCurrentFont(&lf);
editfont.CreateFontIndirect(&lf);
GetDlgItem(IDC_EDIT1)->SetFont(&editfont,1);