在一个类里面调用另一个类的函数,编译器报错的问题!!急急!!谢谢了!!!!
void CTest6Dlg::RemoveListCell(int cellitem, int cellsubitem)
{
CTest6Dlg::m_ListSeat.SetItemText(cellitem,cellsubitem,"不能使用");
}
。。。。。。。。。。。。
void CPop::OnOK()
{
// TODO: Add extra validation here
CTest6Dlg Dlg;
Dlg.RemoveListCell(CTest6Dlg.nSelected,CTest6Dlg.nSubSelected);
CDialog::OnOK();
}
6CTestDlg是主对话框的类
CPop 是弹出对话框的类
我在点击CPop::OnOK对应的按钮时
编译器告诉我E:\Microsoft Visual Studio\MyProjects\test6\Pop.cpp(49) : error C2275: 'CTest6Dlg' : illegal use of this type as an expression
怎么办啊!!!!!!!