CFontDialog fdlg;
if(fdlg.DoModal()==IDOK)
{
LOGFONT lf;
CFont *ft;
ft=new CFont;
fdlg.GetCurrentFont(&lf);
ft->CreateFontIndirect(&lf);
this->m_font.SetFont(ft,TRUE); //m_font是编辑框连接的control变量
}
if(fdlg.DoModal()==IDOK)
{
LOGFONT lf;
CFont *ft;
ft=new CFont;
fdlg.GetCurrentFont(&lf);
ft->CreateFontIndirect(&lf);
this->m_font.SetFont(ft,TRUE); //m_font是编辑框连接的control变量
}