Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Access members from a dialog to the Viewframe

Access members from a dialog to the Viewframe

Scheduled Pinned Locked Moved C / C++ / MFC
c++
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    Ibana
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups