假设我新建了一个项目的名字叫 "test"
则所生成的应用程序的每个窗体的名字叫  "test"
现在我想把每个窗体的名字改成  nottest
则应该在现在的项目中更改哪一个属性或着是资源文件?

解决方案 »

  1.   

    更改资源中的字符串,对应的IDR_TYPE IDR_MAINFRM等,我记得不太清楚了。
      

  2.   

    CWnd* m_pCWnd = AfxGetMainWnd( ),然后,再以如下形式调用SetWindowText()函数:
    SetWindowText( *m_pCWnd,(LPCTSTR)m_WindowText);// m_WindowText可以是一个CString类的变量。
      

  3.   

    BOOL CPaintApp::InitInstance()
    {
    AfxEnableControlContainer();#ifdef _AFXDLL
    Enable3dControls(); // Call this when using MFC in a shared DLL
    #else
    Enable3dControlsStatic(); // Call this when linking to MFC statically
    #endif // Change the registry key under which our settings are stored.
    // TODO: You should modify this string to be something appropriate
    // such as the name of your company or organization.
    SetRegistryKey(_T("Local AppWizard-Generated Applications"));
    // To create the main window, this code creates a new frame window
    // object and then sets it as the application's main window object. CMainFrame* pFrame = new CMainFrame;
    m_pMainWnd = pFrame;
    // create and load the frame with its resources pFrame->LoadFrame(IDR_MAINFRAME,
    WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, NULL,
    NULL);
    // The one and only window has been initialized, so show and update it.
    pFrame->ShowWindow(SW_SHOW);
        // 设置标题
    m_pMainWnd->SetWindowText("test");
        // 设置标题图标
    HICON hIcon = LoadIcon(IDR_MAINFRAME);
    m_pMainWnd->SetIcon(hIcon, FALSE);
    pFrame->UpdateWindow(); return TRUE;
    }
    找到了,在init函数里面,谢谢!