版权声明:本文为博主原创文章,未经博主允许不得转载。
- //在CMainFrame类的PreCreateWindow函数中加入
- m_strTitle = _T("Hello");
- cs.style &= ~FWS_ADDTOTITLE;
- //即可修改主框架窗口的标题。代码如下:
- BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
- {
- m_strTitle = _T("Hello");
- cs.style &= ~FWS_ADDTOTITLE;
- if( !CMDIFrameWnd::PreCreateWindow(cs) )
- return FALSE;
- // TODO: Modify the Window class or styles here by modifying
- // the CREATESTRUCT cs
- return TRUE;
- }