Property sheets are also a common controls provided by MFC. Property
sheets are actually tabbed dialog boxes that contain pages of controls. The user
can switch among the tabbed dialog boxes with a mouse click on the tab.
The MFC classes CPropertySheet and CPropertyPage encapsulate all
the functionality of the property sheets. A class needs to be derived from
CPropertySheet, which in turn is derived from CWnd, to represent the property
sheet itself. Also, a class needs to be derived from CPropertyPage, which is
actually derived from CDialog, to represent each of the property pages. Both
CPropertySheet and CPropertyPage are defined in the header file <afxdlgs.h>.
Property sheets can be modal or modeless. Just like with dialog boxes, a modal
property sheet is displayed using the function CPropertySheet::DoModal();
a modeless property sheet is displayed using the function
CPropertySheet::Create(). A modal property sheet has OK, Cancel, and Apply
buttons automatically included. A modeless property sheet does not have these
buttons; the user must create the desired buttons.
|