作者nosrep (YYY)
看板Programming
标题Re: [问题] VC 加了 CRichEditCtrl 程式就马上关闭了?
时间Mon Jun 12 11:54:54 2006
cut from MSDN...... 挖勒...怎麽和其他的 ctrl 不一样啊...
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.
※ 引述《nosrep (YYY)》之铭言:
: 本来我以为有一种病毒会破坏 riched20.dll...
: 可是扫毒以後也没发现异状~
: 而且我用的 IE6.0 应该不会中毒才是~
: 我发现系统礼确实有两个档 riched20.dll 和 riched32.dll
: 不知道vc是不是 link 这里~
: 我另外也试出只要任意的视窗程式加上 richeditctrl 就无法顺利启动~
: 我设 breakpoint
: int nResponse = dlg.DoModal();
: if (nResponse == IDOK)
: {
: // TODO: Place code here to handle when the dialog is
: // dismissed with OK
: }
: else if (nResponse == IDCANCEL)
: {
: // TODO: Place code here to handle when the dialog is
: // dismissed with Cancel
: }
: return FALSE;
: 程式跑完. nResponse = -1 然後就直接跳到 FALSE...
: IDCANCEL = 2, 所以在 DoModal()那里面可能就早有问题了~
: ※ 引述《nosrep (YYY)》之铭言:
: : 不知为何, 我的Resource视窗只要加了 CRichEditCtrl,
: : 程式 F5 一执行马上就离开了...也没任何错误~
: : 是因为我的 dll 的问题吗?? 还是我安装的软体移除了什麽东西?
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 210.202.1.253