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. parent dialog accessing from a child dialog

parent dialog accessing from a child dialog

Scheduled Pinned Locked Moved C / C++ / MFC
question
5 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.
  • E Offline
    E Offline
    erfi
    wrote on last edited by
    #1

    how i can change the parent dialog's variables from a child dialog? erfan

    M D 2 Replies Last reply
    0
    • E erfi

      how i can change the parent dialog's variables from a child dialog? erfan

      M Offline
      M Offline
      Milton Karimbekallil
      wrote on last edited by
      #2

      pass the this pointer of the parent class to the child. cheers..Milton Kb

      E 1 Reply Last reply
      0
      • E erfi

        how i can change the parent dialog's variables from a child dialog? erfan

        D Offline
        D Offline
        David Crow
        wrote on last edited by
        #3

        Are you sure you want to do this? It's considered bad OO design for a child object to operate on items belonging to its parent. Consider sending the parent a message instead.


        "The largest fire starts but with the smallest spark." - David Crow

        "Judge not by the eye but by the heart." - Native American Proverb

        E 1 Reply Last reply
        0
        • D David Crow

          Are you sure you want to do this? It's considered bad OO design for a child object to operate on items belonging to its parent. Consider sending the parent a message instead.


          "The largest fire starts but with the smallest spark." - David Crow

          "Judge not by the eye but by the heart." - Native American Proverb

          E Offline
          E Offline
          erfi
          wrote on last edited by
          #4

          thanks. i know this is a bad way but i need it

          1 Reply Last reply
          0
          • M Milton Karimbekallil

            pass the this pointer of the parent class to the child. cheers..Milton Kb

            E Offline
            E Offline
            erfi
            wrote on last edited by
            #5

            thanks erfan

            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