CPropertySheet

Win32++

CPropertySheet Class

Description

This class is used to create and manage a property sheet. A property sheet will have one or more property pages. These pages are much like dialogs which are presented within a tabbed dialog or within a wizard. The data on a property page can be validated before the next page is presented. Property sheets have three modes of use: Modal, Modeless, and Wizard.

Refer to the PropertySheet demo program for an example of how property sheets can be used.

CPropertySheet Members:

Construction

CPropertySheet
CPropertySheet(UINT nIDCaption, HWND hwndParent = NULL);
CPropertySheet(LPCTSTR pszCaption = NULL, HWND hwndParent = NULL);
Constructs a  CPropertySheet object.

Attributes

GetActivePage
CPropertyPage* GetActivePage() const;
Retrieves the active CPropertyPage.
GetPageCount
int GetPageCount() const;
Retrieves the number of pages in the property sheet.
GetPageIndex
int GetPageIndex(CPropertyPage* pPage) const;
Retrieves the index of the specified page
GetTabControl
HWND GetTabControl() const;
Retrieves the window handle of the property sheet's tab control.
SetActivePage
virtual BOOL SetActivePage(int nPage);
virtual BOOL SetActivePage(CPropertyPage* pPage);
Sets the active property page.
SetWizardMode
virtual void SetWizardMode(BOOL bWizard);
Set to TRUE if the property sheet is a wizard.

State functions

IsModeless
BOOL IsModeless() const;
Returns TRUE if the property sheet is modeless.
IsWizard
BOOL IsWizard() const;
Returns TRUE if the property sheet is a wizard.

Overridables

Destroy
virtual void Destroy();
Called when CPropertySheet is about to be deconstructed.
PreTranslateMessage
virtual BOOL PreTranslateMessage(MSG* pMsg);
Translates keyboard and mouse messages before they are passed to TranslateMessage.

Operations

AddPage
virtual CPropertyPage* AddPage(CPropertyPage* pPage);
Adds a property page to the property sheet.
Create
virtual HWND Create(HWND hWndParent = 0);
Creates a modeless property sheet.
CreatePropertySheet
virtual INT_PTR CreatePropertySheet(LPCPROPSHEETHEADER ppsph);
Creates a property sheet.
DestroyButton
virtual void DestroyButton(int iButton);
Removes a button.
DoModal
virtual int DoModal();
Creates a modal property sheet.
RemovePage
virtual void RemovePage(CPropertyPage* pPage);
Remove a property page.
SetTitle
virtual void SetTitle(LPCTSTR szTitle);
Sets the title of the property sheet.
Base class Members

For base class members, refer to the members of CWnd.

Summary Information

Header file propertysheet.h
Win32/64 support Yes
WinCE support Yes