请问怎样把单文档中的标题“无标题-工程名”定义成自己的标题呢?谢了,哈哈

解决方案 »

  1.   

    要改工程名,改IDR_MAINFRAME所指字符串中的第一项
      

  2.   

    xyw2278(启明星):CDocument::SetTitle()
    在哪用阿,怎么用阿?比如标题改为“工程”
      

  3.   

    在应用程序的InitInstance中添加。
    例:
    BOOL CTestApp::InitInstance()
    {
       ....... m_pMainWnd->SetWindowText("你的标题"); m_pMainWnd->ShowWindow(SW_SHOW);
    m_pMainWnd->UpdateWindow();
    }
      

  4.   

    xyw2278(启明星):CDocument::SetTitle()
    在哪用阿,怎么用阿?比如标题改为“工程”SetTitle 是 CDocument 的虚函数;重载一下并在其中添加你的代码。
      

  5.   

    在C***View的OnInitUpdate()中
        CString s;
        if (! s.LoadString( IDS_TITLE ))
        {
            AfxMessageBox("Error Loading String: IDS_FILENOTFOUND");
        }
        this->GetOwner()->SetWindowText(s);