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. Uninitialized parent members

Uninitialized parent members

Scheduled Pinned Locked Moved C / C++ / MFC
question
3 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.
  • A Offline
    A Offline
    Arjan Schouten
    wrote on last edited by
    #1

    I have a dialog that I invoke with a button press on a Propertypage. From within the Dialog I want to acces certain propertypage member variables. This is the way I do it. m_List = ((CParameterPage*) GetParent())->m_ParList; But it seems that all variables I acces are uninitialized eventhough they have correct values before I invoke the dialog! What am I doing wrong?

    T 1 Reply Last reply
    0
    • A Arjan Schouten

      I have a dialog that I invoke with a button press on a Propertypage. From within the Dialog I want to acces certain propertypage member variables. This is the way I do it. m_List = ((CParameterPage*) GetParent())->m_ParList; But it seems that all variables I acces are uninitialized eventhough they have correct values before I invoke the dialog! What am I doing wrong?

      T Offline
      T Offline
      Tomasz Sowinski
      wrote on last edited by
      #2

      Actually, a dialog invoked from property page isn't a child window. So you can't use GetParent; add the pointer as a memmber of CYourDialog class. If you only need to access the list, add the pointer/reference to the list instead. Tomasz Sowinski -- http://www.shooltz.com

      ** Putt knot yore thrust inn spel chequers. **

      A 1 Reply Last reply
      0
      • T Tomasz Sowinski

        Actually, a dialog invoked from property page isn't a child window. So you can't use GetParent; add the pointer as a memmber of CYourDialog class. If you only need to access the list, add the pointer/reference to the list instead. Tomasz Sowinski -- http://www.shooltz.com

        ** Putt knot yore thrust inn spel chequers. **

        A Offline
        A Offline
        Arjan Schouten
        wrote on last edited by
        #3

        Thank you, And the compiler couldn't tell me that:) Arjan. If every fool wore a crown, we would all be king - Lard

        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