兴建一个单文档应用程序后,窗口显示的标题为:文档标题 主窗口标题。
修改文档标题的方式:
改变****Doc::On
BOOL CSDITitleDoc::On
{if (!CDocument::On
//红色的为添加的代码;
SetTitle (" 软件版权保护系统 " );
return TRUE;
}
主窗口标题的修改:
修改MainFrame的成员函数PreCreateWindow()
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
if( !CFrameWnd::PreCreateWindow(cs) )
return FALSE;
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
//红色的为添加的代码;
m_strTitle = " 软件水印 ";
return CFrameWnd::PreCreateWindow(cs);
return TRUE;
}
修改完成后的截图: