Access members from a dialog to the Viewframe
-
Hi there all experts! I have an app where I want to access a string that is being set in a Dialog. I use MFC and the Doc/View structure. I now want to be able to pass it on to the View class but I havent been able to do so. The Dialog is an own class that I have included into my CvtkSDIApp.cpp file where all the others Doc/View/Frame are included. Look below to see .. #include "MainFrm.h" #include "vtkSDIDoc.h" #include "vtkSDIView.h" #include "StressesDlg.h" ... I access the dialog from the mainframe I have tried to add an getView function in my StressesDlg class to be able to get hold of the view string member that I want to use. // CStressesDlg dialog //forward declaration class CvtkSDIView; class CStressesDlg : public CDialog { public: CStressesDlg(CWnd* pParent = NULL); // standard constructor virtual ~CStressesDlg(); CVtkSDIView * GetView(); private: CVtkSDIView * GetView; }; // and In my implementaion file CVtkSDIView * CStressesDlg::GetView() { return View; } // it doesnt like this at all it doesnt recongiazie my view (CVtkSDIView) as a class. //I have tired with and without forward declaration of the CVtkSDIView class in the dialog class as you can see above. Regards, peter