如果在对话框添加一个RichText控件,程序就不能运行,但能编译通过.谁知这是怎么回事?看看Debug里的信息:Loaded 'C:\WINNT\System32\ntdll.dll', no matching symbolic information found.
Loaded symbols for 'C:\WINNT\system32\MFC42D.DLL'
Loaded symbols for 'C:\WINNT\system32\MSVCRTD.DLL'
Loaded 'C:\WINNT\system32\kernel32.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\gdi32.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\user32.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\advapi32.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\rpcrt4.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\shell32.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\shlwapi.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\msvcrt.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\comctl32.dll', no matching symbolic information found.
Loaded symbols for 'C:\WINNT\system32\MFCO42D.DLL'
Loaded 'C:\WINNT\system32\imm32.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\mfc42loc.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\MSCTF.DLL', no matching symbolic information found.
Loaded 'C:\WINNT\system32\IMSC40A.IME', no matching symbolic information found.
Loaded 'C:\WINNT\system32\oleaut32.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\ole32.dll', no matching symbolic information found.
Error: no data exchange control with ID 0x03F2.
Loaded 'C:\WINNT\system32\version.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\lz32.dll', no matching symbolic information found.
Loaded 'C:\WINNT\MUI\FALLBACK\0804\msctf.dll.mui', no matching symbolic information found.
The thread 0x404 has exited with code 0 (0x0).
The program 'F:\mydoc\vcsrc\CTopicSortDemo\Debug\CTopicSortDemo.exe' has exited with code 0 (0x0).

解决方案 »

  1.   

    在app的initinstance里面加入AfxInitRichEdit();
      

  2.   

    The thread 0x404 has exited with code 0 (0x0).
    The program 'F:\mydoc\vcsrc\CTopicSortDemo\Debug\CTopicSortDemo.exe' has exited with code 0 (0x0).程序已经运行,但是由于什么原因又退出了,检查你的初始化代码,或者下断点看看
      

  3.   

    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
    // SetDialogBkColor(RGB(100,100,100));
    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;
    }