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. Trapping the Active Page in a CPropertySheet in MFC using CStrings

Trapping the Active Page in a CPropertySheet in MFC using CStrings

Scheduled Pinned Locked Moved C / C++ / MFC
c++
6 Posts 3 Posters 2 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

    I need to know what the Active Page is before the User goes to another Page. The reason for this, I need to collect the data on the Page the User just left. I may need to insert the data the User entered on the Previous Page into the Page the User has selected to go to next. This is not a "Wizard" type CPropertySheet!

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

    _ 1 Reply Last reply
    0
    • L Larry Mills Sr

      I need to know what the Active Page is before the User goes to another Page. The reason for this, I need to collect the data on the Page the User just left. I may need to insert the data the User entered on the Previous Page into the Page the User has selected to go to next. This is not a "Wizard" type CPropertySheet!

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

      _ Offline
      _ Offline
      _Superman_
      wrote on last edited by
      #2

      Use CPropertySheet::GetActivePage[^] to get the active CPropertyPage object.

      «_Superman_» I love work. It gives me something to do between weekends.
      Microsoft MVP (Visual C++)

      L 1 Reply Last reply
      0
      • _ _Superman_

        Use CPropertySheet::GetActivePage[^] to get the active CPropertyPage object.

        «_Superman_» I love work. It gives me something to do between weekends.
        Microsoft MVP (Visual C++)

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

        Supperman wrote: "Use CPropertySheet::GetActivePage[^] to get the active CPropertyPage object. " Remember, I may want to display data to the now Active Page BEFORE it is presented.   I need to be able to do that! How do I stop the showing of a selected Page before I have a chance to update the Data that may need to be displayed on the selected page?

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

        _ 1 Reply Last reply
        0
        • L Larry Mills Sr

          Supperman wrote: "Use CPropertySheet::GetActivePage[^] to get the active CPropertyPage object. " Remember, I may want to display data to the now Active Page BEFORE it is presented.   I need to be able to do that! How do I stop the showing of a selected Page before I have a chance to update the Data that may need to be displayed on the selected page?

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

          _ Offline
          _ Offline
          _Superman_
          wrote on last edited by
          #4

          Override the OnKillActive method in the property page derived class. From here you can communicate with the property sheet class using messages or events. The property sheet class can then act as a mediator to copy the necessary data.

          «_Superman_» I love work. It gives me something to do between weekends.
          Microsoft MVP (Visual C++)

          P L 2 Replies Last reply
          0
          • _ _Superman_

            Override the OnKillActive method in the property page derived class. From here you can communicate with the property sheet class using messages or events. The property sheet class can then act as a mediator to copy the necessary data.

            «_Superman_» I love work. It gives me something to do between weekends.
            Microsoft MVP (Visual C++)

            P Offline
            P Offline
            Peter Weyzen
            wrote on last edited by
            #5

            As he said: OnSetActive and OnKillActive should be overridden on each panel. When you exit one panel, OnKillActive is called -- at that point save data from that panel... then on the new panel OnSetActive can load the data needed. I do this all the time, it works great!

            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Peter Weyzen Staff Engineer [SoonR Inc -- PC Power delivered to your phone](http://www.soonr.com)

            1 Reply Last reply
            0
            • _ _Superman_

              Override the OnKillActive method in the property page derived class. From here you can communicate with the property sheet class using messages or events. The property sheet class can then act as a mediator to copy the necessary data.

              «_Superman_» I love work. It gives me something to do between weekends.
              Microsoft MVP (Visual C++)

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

              Yes, that works great. 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