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.
实际上就是装载系统动态连接库 riched32.dll riched20.dll你也可以通过手工装载来搞定。
LoadLibrary( "riched20.dll" );
可以在InitInstance()
调用
BOOL AFXAPI AfxInitRichEdit( );
{
......
AfxInitRichEdit( );
.........
}
十有八九是这个问题。
我在vc区另外提了一个问题:
“关于用vc做界面有什么好书(最好是电子版的)、好资料吗?
已经你们有心得体会、代码、库吗? ”
欢迎各位去看看