Home > Software engineering >  MFC dialog box cannot be modified CFontDialog can only modify the font color, ask for help! Be urgen
MFC dialog box cannot be modified CFontDialog can only modify the font color, ask for help! Be urgen

Time:12-23

Void CNoteTestDlg: : OnEditFont ()
{
//TODO: add the command handler code
CFont * TempFont=m_FileText. GetFont ();
LOGFONT LOGFONT;
COLORREF CLR.
TempFont - & gt; GetLogFont (& amp; LogFont);
The CLR=RGB (0, 0, 0);
CFontDialog DLG.

If (DLG) DoModal ()==IDOK)
{
M_Font. Detach ();
DLG. GetCurrentFont (& amp; LogFont);
COLORREF m_clr=DLG. GetColor ();
M_Font. CreateFontIndirect (& amp; LogFont);
M_FileText. SetFont (& amp; M_Font);
The CLR=DLG. GetColor ();
}
}
Header file and a definition CFont m_Font;
Can modify the font cannot modify the color, still need to do?
  • Related