作者:曉--伍_621 | 来源:互联网 | 2023-01-08 12:51
在看教程时按步骤编写非模态对话框程序,在CRegisterDialog::OnCancle()函数中加入代码((CRegisterView*)m_pParent)->m_pRegisterDlg
在看教程时按步骤编写非模态对话框程序,在CRegisterDialog::OnCancle()函数中加入代码((CRegisterView*)m_pParent)->m_pRegisterDlg=NULL;遇到编译错误error C2065: 'm_pParent' : undeclared identifier。请问该怎么解决这个问题?
1 个解决方案
m_pParent 这个变量没有声明吧,在相应的.h文件里声明一下看看。或者你把这个语句分开写试下,先声明CRegisterView * m_pParent; 然后再引用 m_pParent->m_pRegisterDlg = NULL;