解决办法:
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.
在CMyApp::InitInstance()中加上这条语句
AfxInitRichEdit();
参考:https://bbs.csdn.net/topics/20383900