I have a problem with my MDI. I have three views. Two are CHtmlViews and when one of the CHtmlView (View2) is clicked; it is suppose to call the other CHtmlView (View1) to go to that website. I have in the CApp class the global variable theApp and a public class GetHtmlView(). GetHtmlView goes through the active frames until View1 is found and return a pointer to it. The problem that I get is
'CApp::GetHtmlView' : cannot access protected member declared in class 'CApp'
: see declaration of 'CApp::GetHtmlView'
: see declaration of 'CApp'
This is CApp::GetHtmlView declaration
CActWin* GetHtmlView();
This is CApp declaration
public CApp : public CWinApp
I have no protected members inside of CApp.
This is where I get the error inside of View2
CActWin* pActWin1 = theApp.GetHtmlView();
pActWin1->Navigate2(lpszURL,NULL,NULL);
The theApp is global like previously stated
extern CApp theApp;
Off topic, but does anyone know the best solution for when View2 is clicked and I don't want View2 to navigate to that website that was clicked on. I used in the OnBeforeNavigate2(); Navigation("current html", NULL, NULL). I just think there should be a better way to prevent View2 from going to another site.
Thanks for any help
'CApp::GetHtmlView' : cannot access protected member declared in class 'CApp'
: see declaration of 'CApp::GetHtmlView'
: see declaration of 'CApp'
This is CApp::GetHtmlView declaration
CActWin* GetHtmlView();
This is CApp declaration
public CApp : public CWinApp
I have no protected members inside of CApp.
This is where I get the error inside of View2
CActWin* pActWin1 = theApp.GetHtmlView();
pActWin1->Navigate2(lpszURL,NULL,NULL);
The theApp is global like previously stated
extern CApp theApp;
Off topic, but does anyone know the best solution for when View2 is clicked and I don't want View2 to navigate to that website that was clicked on. I used in the OnBeforeNavigate2(); Navigation("current html", NULL, NULL). I just think there should be a better way to prevent View2 from going to another site.
Thanks for any help