我编的一个程序中用到了CpropertySheet,里面有2个对话框:CpropertyPage1和CpropertyPage2.且这两个类是定义在同一个头文件中的.
在CpropertyPage1的成员函数中要用到CpropertyPage2中控件的变量.主要功能是在
CpropertyPage1中的数据显示在CpropertyPage2中的listbox控件中.不知如何实现二者之间的通信?....
CpropertyPage2 m_page2;
....
CpropertyPage2::AddItem(CString strTemp)
{
m_listbox.AddString(strTemp);
}CpropertyPage1::func()
{
………
m_page2.AddItem(“12345”);
…………..
}
不行。出错。而且是那种有X号的Debug错误.
在CpropertyPage1的成员函数中要用到CpropertyPage2中控件的变量.主要功能是在
CpropertyPage1中的数据显示在CpropertyPage2中的listbox控件中.不知如何实现二者之间的通信?....
CpropertyPage2 m_page2;
....
CpropertyPage2::AddItem(CString strTemp)
{
m_listbox.AddString(strTemp);
}CpropertyPage1::func()
{
………
m_page2.AddItem(“12345”);
…………..
}
不行。出错。而且是那种有X号的Debug错误.
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货