我在主界面对话框类中打开一个新的对话框类
在新类的OnInitDialog() 函数中有
BOOL CQueryResultDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
// m_cresult为一个ListControl控件
m_cresult.InsertColumn(0,"name",LVCFMT_LEFT,100);
m_cresult.InsertColumn(1,"grade",LVCFMT_LEFT,100);
return TRUE; // return TRUE unless you set the focus to a cont
}
目的是初始化 m_cresult控件
但运行时报错了,why???
在线等待中
在新类的OnInitDialog() 函数中有
BOOL CQueryResultDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
// m_cresult为一个ListControl控件
m_cresult.InsertColumn(0,"name",LVCFMT_LEFT,100);
m_cresult.InsertColumn(1,"grade",LVCFMT_LEFT,100);
return TRUE; // return TRUE unless you set the focus to a cont
}
目的是初始化 m_cresult控件
但运行时报错了,why???
在线等待中
你再编译就可以了
我试了,可以执行的
BOOL CDialog::OnInitDialog()
{
// execute dialog RT_DLGINIT resource
BOOL bDlgInit;
if (m_lpDialogInit != NULL)
bDlgInit = ExecuteDlgInit(m_lpDialogInit);
else
bDlgInit = ExecuteDlgInit(m_lpszTemplateName); *****
就在****这一行