15,978
社区成员
发帖
与我相关
我的任务
分享
CHARFORMAT cf;
//判断是否选择了内容
BOOL m_bSelect = (m_reinput.GetSelectionType() != SEL_EMPTY) ? TRUE : FALSE;
CFontDialog dlg;
if (dlg.DoModal() == IDOK)
{
dlg.GetCharFormat(cf);//获得所选字体的属性
if (m_bSelect)
{
m_reinput.SetSelectionCharFormat(cf); //为选定的内容设定所选字体
}
else
m_reinput.SetWordCharFormat(cf); //为将要输入的内容设定字体
}