在對話框類MFC程序中加入RichEdit后對話框會無法顯示,只需在InitInstance()中調(diào)用AfxInitRichEdit( )在運(yùn)行時(shí)初始化RichEdit即可。
MSDN描述如下:
AfxInitRichEdit
BOOL AFXAPI AfxInitRichEdit( );
Remarks
Call 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.