我写了一个基于对话框的程序,在对话框上访了一个RichEditCtrl,可程序已运行就退出,不放RIchEditCtrl就没事,这是为什么,我该怎么用RichEditCtrl。哪位大侠帮帮我。

解决方案 »

  1.   

    我以前也遇到过RichEditCtrl的问题,在一个对话框上访上他之后,这个对话框怎么样也显示不出来。后来就没用他。后来听说要修改他的一个什么属性就可以了,我没做过。
      

  2.   

    AfxInitRichEdit 
    PRB: Dialog With RichEdit May Fail During Creation 
    ID: Q166132 
      

  3.   

    在CMyApp::InitInstance()开始处加一句:AfxInitRichEdit();
      

  4.   

    先调用 AfxInitRichEdit( )
      

  5.   

    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.