I don't know how to use both of them. So a sample code with pros and cons is perfect. Which one is preferred? Why?
Neither is preferred, they serve different purposes. If you want a dialog with several pages, use a CPropertySheet. If you need a dialog with several pages while part of the dialog remains fixed, use a CTabCtrl. A CTabCtrl can be used do everything a CPropertySheet can do, but since the CTabCtrl is more complex to use, it shouldn't be used unless you need its extra flexibility. A CPropertySheet can also be used as a wizard by setting a few flags.
The following is an example of using a CTabCtrl:
aCTabCtrl Example http://rabien.com/image/xcolordialog1.png
If this was a CPropertySheet, then it would not be possible to put the sample colors outside of the tabs. (And the buttons would have to be at the bottom)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.