What are property pages ? What are they used for ?
Property sheets are tabbed dialog boxes containing pages that the user can switch with mouse clicks. They are a part of common library of windows just like dialog and other controls. E.g. when a user adds a schedules task it walks him through a wizard which is nothing but a property sheet.
The functionality of property sheets is encapsulated in MFC classes of CPropertySheet and CPropertyPage. CPropertyPage represents a page in a property sheet and is a subclass of CDialog. Like dialog boxes property sheets can be modal or modeless. Use CPropertySheet::DoModal for modal and CPropertySheet::Create for a modeless property sheet.
There are four broad steps in creating a property page:
- For each property page create a dialog template.
- For the created dialog associate a class that derives from CPropertyPage.
- Derive a property sheet class from CPropertySheet and create an object for each above created property pages.
- Add the property page objects to the created property sheet using AddPage.
- Call the doModal function of the property sheet to display it on the screen.
