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. passing info to new class

passing info to new class

Scheduled Pinned Locked Moved C / C++ / MFC
data-structuresquestion
3 Posts 3 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.
  • M Offline
    M Offline
    Michael Shuster
    wrote on last edited by
    #1

    I am trying to do what the previous post was, only I am not calling the new class. I am using the following code: extern CHjipaperlessApp theApp; CMultiDocTemplate *pTemplate = (CMultiDocTemplate*)theApp.GetDocTemplate(3); ASSERT(pTemplate); CDocument *pDocument = pTemplate->OpenDocumentFile(NULL) This launches a view class, but I want to pass an array to this new class. Any suggestions? Much Thanks, Michael Shuster Good judgement comes from experience; Experience comes from bad judgement.

    V R 2 Replies Last reply
    0
    • M Michael Shuster

      I am trying to do what the previous post was, only I am not calling the new class. I am using the following code: extern CHjipaperlessApp theApp; CMultiDocTemplate *pTemplate = (CMultiDocTemplate*)theApp.GetDocTemplate(3); ASSERT(pTemplate); CDocument *pDocument = pTemplate->OpenDocumentFile(NULL) This launches a view class, but I want to pass an array to this new class. Any suggestions? Much Thanks, Michael Shuster Good judgement comes from experience; Experience comes from bad judgement.

      V Offline
      V Offline
      valikac
      wrote on last edited by
      #2

      There are several solutions. One solution is to pass in objects via contructor or call some other function after creation. Kuphryn

      1 Reply Last reply
      0
      • M Michael Shuster

        I am trying to do what the previous post was, only I am not calling the new class. I am using the following code: extern CHjipaperlessApp theApp; CMultiDocTemplate *pTemplate = (CMultiDocTemplate*)theApp.GetDocTemplate(3); ASSERT(pTemplate); CDocument *pDocument = pTemplate->OpenDocumentFile(NULL) This launches a view class, but I want to pass an array to this new class. Any suggestions? Much Thanks, Michael Shuster Good judgement comes from experience; Experience comes from bad judgement.

        R Offline
        R Offline
        Roger Allen
        wrote on last edited by
        #3

        After the OpenDocumentFile() call, you have a pointer tot he document, can't you just call a function on it and pass it the array as a parameter? You may have to cast the pDocument pointer to the correct type to do it. Roger Allen Sonork 100.10016 Were you different as a kid? Did you ever say "Ooohhh, shiny red" even once? - Paul Watson 11-February-2003

        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