我用 VC++7.0 做一个对话框,一在对话框上放上 RICHEDIT2.0 控件,程序一运行就退出,把 RICHEDIT控件删除了,程序就正常运行

解决方案 »

  1.   

    加个AfxInitRichEdit();初始化应该可以了。
      

  2.   

    RICHEDIT2.0 到目前为止没有发现有BUG 所以是你使用的问题.
      

  3.   

    我 加个AfxInitRichEdit();还是有问题,一启动什么就马上退出
      

  4.   

    确定是加到了 BOOL CXXXXApp::InitInstance() 里吗 ?
      

  5.   

    BOOL CTest6App::InitInstance()
    {
    AfxEnableControlContainer(); AfxInitRichEdit();//加在这里 // Standard initialization
    // If you are not using these features and wish to reduce the size
    //  of your final executable, you should remove from the following
    //  the specific initialization routines you do not need.#ifdef _AFXDLL
    Enable3dControls(); // Call this when using MFC in a shared DLL
    #else
    Enable3dControlsStatic(); // Call this when linking to MFC statically
    #endif CTest6Dlg dlg;
    m_pMainWnd = &dlg;
    int nResponse = dlg.DoModal();
    if (nResponse == IDOK )
    {
    // TODO: Place code here to handle when the dialog is
    //  dismissed with OK
    }
    else if (nResponse == IDCANCEL)
    {
    // TODO: Place code here to handle when the dialog is
    //  dismissed with Cancel
    }

    // Since the dialog has been closed, return FALSE so that we exit the
    //  application, rather than start the application's message pump.
    return FALSE;
    }