在dlg中想调用View中的一个函数,怎么编译通不过阿?
ohfox 2005-12-15 06:18:53
void CApplyBuyDlg::OnRclickList1(NMHDR* pNMHDR, LRESULT* pResult)
{
// TODO: Add your control notification handler code here
CMainFrame *pMain=(CMainFrame *)AfxGetMainWnd();
CMyView *pView=(CMyView *)(pMain->GetActiveView());
ASSERT(pView);
pView->PopUpDlgListMenu();
*pResult = 0;
}
出错如下
ompiling...
ApplyBuyDlg.cpp
E:\Microsoft Visual Studio\MyProjects\My\ApplyBuyDlg.cpp(223) : error C2027: use of undefined type 'CMyView'
e:\microsoft visual studio\myprojects\My\mainfrm.h(14) : see declaration of 'CMyiew'
E:\Microsoft Visual Studio\MyProjects\My\ApplyBuyDlg.cpp(223) : error C2227: left of '->PopUpDlgListMenu' must point to class/struct/union
Error executing cl.exe.
我的pView明显是指针阿??