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:


  1. For each property page create a dialog template.

  2. For the created dialog associate a class that derives from CPropertyPage.

  3. Derive a property sheet class from CPropertySheet and create an object for each above created property pages.

  4. Add the property page objects to the created property sheet using AddPage.

  5. Call the doModal function of the property sheet to display it on the screen.