设置窗口和文档标题

来源:互联网 发布:淘宝直通车可以退款吗 编辑:程序博客网 时间:2024/06/05 22:56

文档标题的改变

BOOL CCeshi2Doc::OnNewDocument(){if (!CDocument::OnNewDocument())return FALSE;// TODO: add reinitialization code here// (SDI documents will reuse this document)SetTitle("文档标题");return TRUE;}

主窗口标题的改变

 第一种方法:利用ResourceView打开工程的资源,修改String Table中的IDR_MAINFRAME的值。将原来的“test\n\nTitle\n\n\nTitle.Document\nTitle Document”改为标题改变示例\n\nTitle\n\n \nTitle. Document\nTitle Document”。就是第一个\n前面的去掉

第二种方法

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="VC编程网";return TRUE;}



原创粉丝点击