new CFont指针如何释放
CFont *myFont;
myFont = new CFont;
myFont->CreateFont(13, // nHeight
0, // nWidth
0, // nEscapement
0, // nOrientation
100, // nWeight
FALSE, // bItalic
FALSE, // bUnderline
0, // cStrikeOut
ANSI_CHARSET, // nCharSet
OUT_DEFAULT_PRECIS, // nOutPrecision
CLIP_DEFAULT_PRECIS, // nClipPrecision
DEFAULT_QUALITY, // nQuality
DEFAULT_PITCH | FF_SWISS, // nPitchAndFamily
_T("宋体")); // lpszFac
CRect rc;
GetWindowRect(&rc);
m_groupbox.Create(_T("矩阵控制"),BS_GROUPBOX|WS_VISIBLE,CRect(9,5,rc.Width()-14,rc.Height()-53),this,8888);
GetDlgItem(8888)->SetFont(myFont);
我想设置我创建的goupbox的标题字体大小,上面是我的代码,请问我要如何释放new出来的font指针呢,
如何我加了delete myFont;或者myFont->DeleteObject();的话,我设置的字体大小就无效了,不加就有效。
请求各位帮帮小弟。