RICH EDIT 需要在CXXXApp类的InitInstance中添加
if(!AfxInitRichEdit( ))
{
return FALSE;
}
否则会有错,

解决方案 »

  1.   

    AfxInitRichEdit
    BOOL AFXAPI AfxInitRichEdit( );ResCall this function to initialize the rich edit control for the application. It will also initialize the common controls library, if the library hasn’t already been initialized for the process. If you use the rich edit control directly from your MFC application, you should call this function to assure that MFC has properly initialized the rich edit control runtime. If you use rich edit via CRichEditCtrl, CRichEditView, or CRichEditDoc, you don't need to call this function.