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 |