我在dlg2所属类中的.cpp中定义了static bool choose=true
我想在dlg1所属类中调用dlg2中的这个静态成员,应该怎么写?
void Cdlg1::OnButton1()
{
// TODO: Add your control notification handler code here
}
我在dlg2所属类中的.cpp中定义了static bool choose=true
我想在dlg1所属类中调用dlg2中的这个静态成员,应该怎么写?
void Cdlg1::OnButton1()
{
// TODO: Add your control notification handler code here
}
参考一下这个
((CstudylistDlg*)GetParent())->m_List.GetItemCount();//CstudylistDlg是另一个文件中的类m.List是对象
注意开头#include一下头文件
ps:我是新手,我也是前几天刚遇到这个问题