在MFC中使用CRichEdit控件

来源:互联网 发布:bugzilla windows下载 编辑:程序博客网 时间:2024/06/06 10:07

在CXXXAPP::InitInstance()

{

::AfxInitRichEdit();


//before the Dialog Class Create

CXXXXDlg dlg

}


这样就可以了,不是在DlgClass的Init函数中。

一段实例

BOOL CRichTextTestApp::InitInstance(){AfxEnableControlContainer();::AfxInitRichEdit();// Standard initializationCRichTextTestDlg dlg;m_pMainWnd = &dlg;int nResponse = dlg.DoModal();if (nResponse == IDOK){}else if (nResponse == IDCANCEL){}// Since the dialog has been closed, return FALSE so that we exit the//  application, rather than start the application's message pump.return FALSE;}


原创粉丝点击