使用RichEdit控件程序启动不了

本文介绍了在对话框中使用富文本编辑控件时如何正确初始化的问题。根据MSDN文档,若应用程序使用了富文本编辑控件,无论其是SDI、MDI还是基于对话框的应用,都需要在首次显示对话框之前调用AfxInitRichEdit()函数进行初始化。
解决方案:          
在CxxxApp类的InitInstance成员函数中加入AfxInitRichEdit()      
原因:           
msdn上如是说: 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.
 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值