在MFC对话框中添加RichEdit后,运行不显示对话框

来源:互联网 发布:深网网络 编辑:程序博客网 时间:2024/05/06 15:12

添加RichEdit后,对话框不能正常显示,只需在InitInstance()中调用AfxInitRichEdit()在运行时初始化RichEdit即可。


微软官方解释: 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.


0 0