BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) { if( !CFrameWnd::PreCreateWindow(cs) ) return FALSE; // TODO: Modify the Window class or styles here by modifying // the CREATESTRUCT cs cs.style &= ~FWS_ADDTOTITLE; return TRUE; }
楼上都说完了,我补充下 用 文档类的 SetTitle 也可以
用class wazid 在文档类加上SetTitle函数,在SetTitle里写你的标题void CFoobarDoc::SetTitle(LPCTSTR lpszTitle) { // TODO: Add your specialized code here and/or call the base class
{
if( !CFrameWnd::PreCreateWindow(cs) )
return FALSE;
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
cs.style &= ~FWS_ADDTOTITLE;
return TRUE;
}
用 文档类的 SetTitle 也可以
{
// TODO: Add your specialized code here and/or call the base class
CDocument::SetTitle("foobar");
}