如题,放了"RichEdit"之后运行时连窗口都没有(但是编译没有问题),去掉"RichEdit"之后就能运行了.使用静太链接也还是不行,望知情者指教.

解决方案 »

  1.   

    在 App 的初始化位置 
    ::AfxInitRichEdit();或
    ::AfxInitRichEdit2();
      

  2.   

    谢谢 xing_xing_xing(ζ未名ζ)  的答复,可以运行了,这是我的代码:
    CTestDialogApp::CTestDialogApp()
    {
    // TODO: add construction code here,
    // Place all significant initialization in InitInstance
    AfxInitRichEdit();
    }不过运行之后RichEdit中的内容不能换行(粘贴都只能粘贴第一行),不知为何?
      

  3.   

    http://blog.csdn.net/lixiaosan/archive/2006/04/06/652795.aspx
      

  4.   

    在 App 的初始化位置 
    ::AfxInitRichEdit();
      

  5.   

    换不了行啊,哎
    还是delphi好!
      

  6.   

    怎么会不能换行呢?
    RichEdit控件右键属性:
    1.Multiline属性勾上
    2.Auto HScroll属性勾去掉(去掉水平滚动)
    3.Auto VScroll属性勾上(加上垂直滚动)
    再不行的话,我弃VC从Delphi...
      

  7.   

    Caution  
    If you are using a rich edit control in a dialog box (regardless whether your application is SDI, MDI, or dialog-based), you must call AfxInitRichEdit once before the dialog box is displayed. A typical place to call this function is in your program's InitInstance member function. You do not need to call it for each time you display the dialog box, only the first time. You do not have to call AfxInitRichEdit if you are working with CRichEditView