June 4th, 2009, 09:00 PM
Convert existing dialogs/tabctrl to propertypages/sheet?
First off I want to thank all who have been giving me good suggestions, tips and examples on here with my current issues involving tabctrl. It has been recommeded by several that I switch to propertpages instead and after researching it, I can see why.
As mentioned in other posts, I am experienced with C++ application programming but not the upper "end" aspects of it and examples often help clarify things when ever possible.
Now this may be a "simple" thing to many but for a novice with this... it is a bit confusing.
As mentioned before, I currently have a main dialog that currently holds the CTabctrl. Will call in AcctMain. I also have several dialogs, already created and coded with fields, etc that are the actual tab pages themselves. They are AcctSetup, AcctDetail, AcctStatus. All was created using the Resource Editor and inserting Dialogs as needed. The AcctMain as well as the class for the CTabctrl had the code that actually associated each tab with the appropriate dialog.
Is there an easy way to convert all this (or some of it) to a propertysheet and propertypages without having to recreate and recode all this existing work? It looks similar in alot of aspects but then the MFC examples I have run across have different ways to create it.
Once again, thanks for any direction you can provide....
June 5th, 2009, 12:49 AM
Re: Convert existing dialogs/tabctrl to propertypages/sheet?
Change the base class for the classes AcctSetup, AcctDetail, AcctStatus from CDialog to CPropertyPage. You could do a find and replace here.
Then create a CPropertySheet object and call its AddPage method for each of your 3 dialogs.
Then call DoModal on your property sheet object.
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!