November 29th, 2013, 01:19 PM
How to get pointer to CMyView class from CMainFrame class?
My program is a basic MFC AppWizard (exe) created project in VC++ 6.
In MainFrm.cpp, I am trying to access some user defined CMyView member functions.
However when I try to do the standard procedure to get the CMyView pointer in MainFrm.cpp, I get the " ... 'CMyView' : undeclared identifier" error. To resolve this, I add " #include myView.h " at the top of MainFrm.h which then produces the following errors:
What do these errors mean? Is there a simple way to access CMyView member functions from CMainFrame? Please help!
myview.h(21) : error C2143: syntax error : missing ';' before '*'
myview.h(21) : error C2501: 'CMyDoc' : missing storage-class or type specifiers
myview.h(21) : error C2501: 'GetDocument' : missing storage-class or type specifiers
Last edited by coderDude1; November 29th, 2013 at 01:24 PM.
Click Here to Expand Forum to Full Width