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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Managed C++/CLI
  4. MDI - Accessing MDI parents public variables.

MDI - Accessing MDI parents public variables.

Scheduled Pinned Locked Moved Managed C++/CLI
question
3 Posts 2 Posters 1 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.
  • Q Offline
    Q Offline
    Qwick Miller
    wrote on last edited by
    #1

    I have a MDI. I created four Forms that I use as child Forms (not Forms *form = new Forms() and then init the MDIParent property). I'm haviing trouble trying to find out how I can access public variables of the MDI parent from the child Forms. The MainForm has the include .h files of all my Forms I am using, but when I include the MainForm.h in the child Forms I get compiler errors in: MainForm: ChildForm1 is undeclared.... ChildForm: missing ';' before '*' (referring to MainForm *parent) How do I properly access my public variable in the parent? Thanks!...

    S 1 Reply Last reply
    0
    • Q Qwick Miller

      I have a MDI. I created four Forms that I use as child Forms (not Forms *form = new Forms() and then init the MDIParent property). I'm haviing trouble trying to find out how I can access public variables of the MDI parent from the child Forms. The MainForm has the include .h files of all my Forms I am using, but when I include the MainForm.h in the child Forms I get compiler errors in: MainForm: ChildForm1 is undeclared.... ChildForm: missing ';' before '*' (referring to MainForm *parent) How do I properly access my public variable in the parent? Thanks!...

      S Offline
      S Offline
      Saksida Bojan
      wrote on last edited by
      #2

      Check this two threads: http://www.codeproject.com/script/comments/forums.asp?msg=1123243&forumid=3785#xx1123243xx [^] http://www.codeproject.com/script/comments/forums.asp?msg=1110216&forumid=3785#xx1110216xx[^] Even if this two thread arent talking abaout passing from Child to MDI Parent, It is the same way of using this. I have tried and it worked

      Q 1 Reply Last reply
      0
      • S Saksida Bojan

        Check this two threads: http://www.codeproject.com/script/comments/forums.asp?msg=1123243&forumid=3785#xx1123243xx [^] http://www.codeproject.com/script/comments/forums.asp?msg=1110216&forumid=3785#xx1110216xx[^] Even if this two thread arent talking abaout passing from Child to MDI Parent, It is the same way of using this. I have tried and it worked

        Q Offline
        Q Offline
        Qwick Miller
        wrote on last edited by
        #3

        Thanks for the link to those disscusions. I was able to solve my problem. This method allows me to use the MFC document view method. I use a __gc class as my ducument interface between my Main and child Forms. Cool!...

        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