我在CMainFrame::OnCreate中使用如下的语句:
AfxGetMainWnd()->SetWindowText(_T("你好"));
运行的时候提示该程序非法操作,不止为什么?

解决方案 »

  1.   

    对了, 在 CDocument::SetTitle(LPCTSTR  strFile)  中修改 strFile 就可以了
      

  2.   

    在CXXXAPP中的初始化函数中
    SetWindowText("zswzwy");
      

  3.   


    BOOL CYourDoc::OnNewDocument()
    {
    if (!CDocument::OnNewDocument())
    return FALSE; // TODO: add reinitialization code here
    // (SDI documents will reuse this document)
    SetTitle("您好!");
    return TRUE;
    }