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. C / C++ / MFC
  4. dialog parent window pointer

dialog parent window pointer

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
5 Posts 4 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
    Irish_GUI
    wrote on last edited by
    #1

    hi, im looking to get access to the data in the main parent window dialog from another dialog, i need a pointer to the main window ? can someone give me exact code, as i asked this before and was given instructions and not concencrate help

    J M RaviBeeR 3 Replies Last reply
    0
    • I Irish_GUI

      hi, im looking to get access to the data in the main parent window dialog from another dialog, i need a pointer to the main window ? can someone give me exact code, as i asked this before and was given instructions and not concencrate help

      J Offline
      J Offline
      J B 0
      wrote on last edited by
      #2

      You can try with AfxGetMainWnd()

      I 1 Reply Last reply
      0
      • J J B 0

        You can try with AfxGetMainWnd()

        I Offline
        I Offline
        Irish_GUI
        wrote on last edited by
        #3

        that returns a pointer to desktop :-(

        1 Reply Last reply
        0
        • I Irish_GUI

          hi, im looking to get access to the data in the main parent window dialog from another dialog, i need a pointer to the main window ? can someone give me exact code, as i asked this before and was given instructions and not concencrate help

          M Offline
          M Offline
          Maximilien
          wrote on last edited by
          #4

          you need to pass the "main parent window" pointer to the other dialogs. if you are creating the other dialogs from the parent dialog do something like :

          {
          CAnotherDialog dlg;
          dlg.pParentDialog = this;
          dlg.DoModal();
          }


          Maximilien Lincourt Your Head A Splode - Strong Bad

          1 Reply Last reply
          0
          • I Irish_GUI

            hi, im looking to get access to the data in the main parent window dialog from another dialog, i need a pointer to the main window ? can someone give me exact code, as i asked this before and was given instructions and not concencrate help

            RaviBeeR Offline
            RaviBeeR Offline
            RaviBee
            wrote on last edited by
            #5

            GetParent() /ravi My new year's resolution: 2048 x 1536 Home | Articles | Freeware | Music ravib@ravib.com

            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