RichEdit控件在unicode工程下不正常

According to your descriptions that the unicode may not work correctly for CRichEditCtrl.

You may use the current CRichEditCtrl class with the older RichEdit 1.0 control, but CRichEditCtrl isonly designed to support the RichEdit 2.0 control. Because RichEdit 1.0 and RichEdit 2.0 are very similar,  most methods will work; however, note there are some differences between the 1.0 and 2.0 controls, so some methods might work incorrectly or not
work at all.

Moreover, to use a RichEdit control, you must first call AfxInitRichEdit2 to load the RichEdit 2.0 Control (RICHED20.DLL), or call AfxInitRichEdit to load the older RichEdit 1.0 Control (RICHED32.DLL).

More detailed information please refer to

http://msdn.microsoft.com/en-us/library/cxtk3936.aspx



(1).Rich Edit控件的版本太低,如RichEdit1.0(riched32.dll)就是不支持Unicode的.所以必须换成RichEdit2.0或者3.0(riched20.dll)的.所以在你的程序InitInstance()里面应该有下面代码: 
 HINSTANCE richEdit=::LoadLibrary(_T("riched20.dll")); 
 if(!richEdit) 
  AfxMessageBox(_T("Unable to load RichEdit2.0")); 
 AfxInitRichEdit(); 
(2).如果资源文件中有使用richedit.修改你的资源*.rc.打开rc文件.(Open->*.rc|Text方式|)..把原来的"RICHEDIT"改成"RICHEDIT20W"就可以了.如下: 
    CONTROL         "",IDC_RICHEDIT1,"RICHEDIT20W",WS_BORDER |

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值