我在一个对话框中加了一个Rich Edit控件,一运行显示不出来。后来查找MSDN说是要加一个BOOL AFXAPI AfxInitRichEdit( )函数初始化。于是我把它加在CTestApp::InitInstance()中,但是还是显示不出来。请问我错在哪了.......
请各位帮帮忙。
请各位帮帮忙。
解决方案 »
- 关于SelectObject();
- 高手帮看看这个线程关闭的问题
- 我用MFC 开发醒目遇到DataGrid的一个问题大家帮我解决一下
- vc++ 函数调用的问题
- 帮忙看看,这是什么问题。为什么我的SetBkColor没有?
- 请问各位大哥,我的程序的Debug版运行没有问题,为什么Release老出错呢,CView的OnKeyDown中
- 怎么删除编辑框中的第一行文字?
- 一个workspace中有二个project是什么意思?
- 他们都说这本书,是VC的入门教材,我该怎么做,才可以发挥他的作用。
- 用C语言进行双边滤波到底错在哪里?拜托大家帮我看看
- 哪位好心人可以帮忙写个类似VB里的hex$()的函数?
- 菜鸟在学习消息映射时碰到的问题
加在CTestApp::InitInstance()中,放在函数的第一句。
把这句话放到
CTestApp::InitInstance();
里,创建对话框代码的前面应该不会错的
我是弄了一个基于对话框,只加了一个控件(Rich Edit)的应用。
一运行什么都没有。
我把它原版考下来:
BOOL CTestApp::InitInstance()
{
BOOL AFXAPI AfxInitRichEdit( );//就是这一行
AfxEnableControlContainer();#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif CTestDlg dlg;
m_pMainWnd = &dlg;
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
} // Since the dialog has been closed, return FALSE so that we exit the
// application, rather than start the application's message pump.
return FALSE;
}
删掉前面的BOOL AFXAPI就能显示出来????
这是这是什么原因了???