crazykz
asked on
Newbie: Getting MyView not CView
Basic as they come:
I have created an App in Visual Studio and I'm using the following code to get the view:
CFrameWnd * pFrame = (CFrameWnd*)AfxGetApp()->m _pMainWnd;
CView * pView = pFrame->GetActiveView();
The problem is that I have a function in MyView that I want to use. When I try and type cast pView, like ((CMyView*)pView)->Process Input
, I get the error:
error C2065: 'CMyView' : undeclared identifier
How do I get a pointer so I can call ProcessInput in the MyView class. Using the #include "MyView.h" doesn't work.
Thanks.
I have created an App in Visual Studio and I'm using the following code to get the view:
CFrameWnd * pFrame = (CFrameWnd*)AfxGetApp()->m
CView * pView = pFrame->GetActiveView();
The problem is that I have a function in MyView that I want to use. When I try and type cast pView, like ((CMyView*)pView)->Process
, I get the error:
error C2065: 'CMyView' : undeclared identifier
How do I get a pointer so I can call ProcessInput in the MyView class. Using the #include "MyView.h" doesn't work.
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The important part here is that I learn the correct way to do this. I apologize for submitting this trivial question. Thank you for your answer.