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. Communicating with the pages in a CPropertySheet

Communicating with the pages in a CPropertySheet

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++tutorial
9 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.
  • L Offline
    L Offline
    Larry Mills Sr
    wrote on last edited by
    #1

    (Question 1): How do you obtain the data contained in the various CPropertyPage(s) that the CPropertySheet loaded by the AddPage() function? (Question 2): How do you find out which page the User is presently on?   Ex: how do I find out when all the data has been entered?, so I can collect the data entered(once I find out how to get the data from the CPropertyPage(s))

    A C++ programming language novice, but striving to learn

    L C D 3 Replies Last reply
    0
    • L Larry Mills Sr

      (Question 1): How do you obtain the data contained in the various CPropertyPage(s) that the CPropertySheet loaded by the AddPage() function? (Question 2): How do you find out which page the User is presently on?   Ex: how do I find out when all the data has been entered?, so I can collect the data entered(once I find out how to get the data from the CPropertyPage(s))

      A C++ programming language novice, but striving to learn

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2
      1. CPropertySheet::GetPage(int index) will return a pointer to a CPropertyPage object, which can be cast to a specific CPropertyPage derived class pointer; e.g., CMyPage* page = (CMyPage*)MySheet->GetPage(0);. 2) Likewise, CPropertySheet::GetActivePage()will return a CPropertyPage pointer to the active page. There's also a GetActiveIndex() which returns the integer index of the active page.
      1 Reply Last reply
      0
      • L Larry Mills Sr

        (Question 1): How do you obtain the data contained in the various CPropertyPage(s) that the CPropertySheet loaded by the AddPage() function? (Question 2): How do you find out which page the User is presently on?   Ex: how do I find out when all the data has been entered?, so I can collect the data entered(once I find out how to get the data from the CPropertyPage(s))

        A C++ programming language novice, but striving to learn

        C Offline
        C Offline
        Chris Losinger
        wrote on last edited by
        #3
        1. treat each property page like a standard dialog: it reads and sets member variables that the owner can then set and read.

        image processing toolkits | batch image processing

        L 1 Reply Last reply
        0
        • C Chris Losinger
          1. treat each property page like a standard dialog: it reads and sets member variables that the owner can then set and read.

          image processing toolkits | batch image processing

          L Offline
          L Offline
          Larry Mills Sr
          wrote on last edited by
          #4

          In a Standard dialog you have a CWnd object in it's constructor, the "CBCGPPropertySheet" constructor does not. (see constructor below:) "CPropSheet(CBCGPPropertySheet::PropSheetLook look,UINT uiIconsResID = 0, int cxIcon = 0);" If it had an CWnd object I could easily pass that to the propertypage, How could I obtain the CWnd of the "CBCGPPropertySheet" so I can use it for the propertypage could load inline functions in the CBCGPPropertySheet object?(see inlines below:) "     //inline functions:      void SetDate(CString csDate){ m_csDate = csDate;}"

          A C++ programming language novice, but striving to learn

          C 1 Reply Last reply
          0
          • L Larry Mills Sr

            In a Standard dialog you have a CWnd object in it's constructor, the "CBCGPPropertySheet" constructor does not. (see constructor below:) "CPropSheet(CBCGPPropertySheet::PropSheetLook look,UINT uiIconsResID = 0, int cxIcon = 0);" If it had an CWnd object I could easily pass that to the propertypage, How could I obtain the CWnd of the "CBCGPPropertySheet" so I can use it for the propertypage could load inline functions in the CBCGPPropertySheet object?(see inlines below:) "     //inline functions:      void SetDate(CString csDate){ m_csDate = csDate;}"

            A C++ programming language novice, but striving to learn

            C Offline
            C Offline
            Chris Losinger
            wrote on last edited by
            #5

            why do you need a CWnd ? if you are creating the property sheets, you have the objects themselves - you don't need a CWnd.

            image processing toolkits | batch image processing

            1 Reply Last reply
            0
            • L Larry Mills Sr

              (Question 1): How do you obtain the data contained in the various CPropertyPage(s) that the CPropertySheet loaded by the AddPage() function? (Question 2): How do you find out which page the User is presently on?   Ex: how do I find out when all the data has been entered?, so I can collect the data entered(once I find out how to get the data from the CPropertyPage(s))

              A C++ programming language novice, but striving to learn

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

              Are you wanting the pages to communicate with the sheet, or the pages to communicate with each other?

              "Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown

              "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

              L 1 Reply Last reply
              0
              • D David Crow

                Are you wanting the pages to communicate with the sheet, or the pages to communicate with each other?

                "Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown

                "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                L Offline
                L Offline
                Larry Mills Sr
                wrote on last edited by
                #7

                I may need both. I'm not certain yet which way is best. Could you show me an example of both.   I'll try the examples an see which is best in my program.

                A C++ programming language novice, but striving to learn

                D 1 Reply Last reply
                0
                • L Larry Mills Sr

                  I may need both. I'm not certain yet which way is best. Could you show me an example of both.   I'll try the examples an see which is best in my program.

                  A C++ programming language novice, but striving to learn

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

                  Store the data in the sheet, and use the QuerySiblings() method to forward a message to each page in the sheet. If a page needs to get/put the data, it can get to it via GetParent().

                  "Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown

                  "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                  L 1 Reply Last reply
                  0
                  • D David Crow

                    Store the data in the sheet, and use the QuerySiblings() method to forward a message to each page in the sheet. If a page needs to get/put the data, it can get to it via GetParent().

                    "Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown

                    "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                    L Offline
                    L Offline
                    Larry Mills Sr
                    wrote on last edited by
                    #9

                    Thanks.

                    A C++ programming language novice, but striving to learn

                    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