A simple class for handling Child Dialogs within a dialog or property sheet. These Child Dialogs can be changed on the fly, much like subforms. It's a simple task really, but I got tired of programming everything every time :-(
Step 1. Design one or several 'Subdialogs'. Make sure to set the Style to
Child and to tick the property 'Control'.
Step 2. Design a Parent Dialog. To make things easier, I add a static control for easier positioning of the child dialogs (normally I use a group frame).
Step 3. Generate for all dialogs, their classes.
Step 4. Add the files SubFormCollection.cpp and SubFormCollection.h to your project.
Step 5. Create an object of the class
CSubFormCollection to the parent dialog.
Step 6. In the
OnInitDialog() method of the parent class, add the code below:
Step 7. To switch between the subdialogs, use the code below:
Now the big work starts...
Professional IT developer since 1983. First projects with Cobol, then Pascal, Modula2, C and since Visual C++ 1.0 also with C++. Works since 1986 as Consultant, between 1990 and 2008 for Infobrain in Switzerland, currently employed by enValue (also Switzerland).
Current field is the project management and development of software for Bank applications.
Married, two daughters, Hobbies : Paragliding, Orienteering, Mountainbiking, Photography