我在CWinApp类定义CView * m_pView
在视图OnInitialUpdate()函数里
{
CVsViewerApp *pApp=(CVsViewerApp *)AfxGetApp();
pApp->m_pView=this;
}
在MainFram 中用这句时
AfxGetApp()->m_pView
就提示我m_pView' : is not a member of 'CWinApp'
为什么?
在视图OnInitialUpdate()函数里
{
CVsViewerApp *pApp=(CVsViewerApp *)AfxGetApp();
pApp->m_pView=this;
}
在MainFram 中用这句时
AfxGetApp()->m_pView
就提示我m_pView' : is not a member of 'CWinApp'
为什么?
可以这样访问 ((CVsViewerApp *)AfxGetApp())->m_pView
it is a member of 'CVsViewerApp'