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. Exchange of values among different classes of same project

Exchange of values among different classes of same project

Scheduled Pinned Locked Moved C / C++ / MFC
c++data-structureshelp
2 Posts 2 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.
  • S Offline
    S Offline
    summo
    wrote on last edited by
    #1

    :~ I have been unable to pass values from one class to another in a VC++ SDI application. Actually In one class (say class1) I am constantly getting CString values. I want to pass some of these values to another class (say class3). In class2 , user is setting some rules on the base of which it is decided that whether string shold be passed from class1(list control) to class3(list control). I have adopted a lot of methods but failed to do so even with a single one. I would prefer array[] to act as a buffer for these values. Plz help me out. But if there is some other easier method, plz suggest. Reply me soon

    W 1 Reply Last reply
    0
    • S summo

      :~ I have been unable to pass values from one class to another in a VC++ SDI application. Actually In one class (say class1) I am constantly getting CString values. I want to pass some of these values to another class (say class3). In class2 , user is setting some rules on the base of which it is decided that whether string shold be passed from class1(list control) to class3(list control). I have adopted a lot of methods but failed to do so even with a single one. I would prefer array[] to act as a buffer for these values. Plz help me out. But if there is some other easier method, plz suggest. Reply me soon

      W Offline
      W Offline
      Woody Green
      wrote on last edited by
      #2

      Hi, I presume you want to store application specific data at a central point. This can be done by using member variables in your CDocument class. Get a pointer to the document in your other classes and you can access the data. You could/should add some helper functions in your document class to store and retrieve the data. Woody

      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