Trapping the Active Page in a CPropertySheet in MFC using CStrings
-
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
-
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
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++) -
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++)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
-
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
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++) -
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++)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)
-
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++)Yes, that works great. Thanks.
A C++ programming language novice, but striving to learn