다음을 통해 공유


CPropertyPage Class

Represents individual pages of a property sheet, otherwise known as a tab dialog box.

class CPropertyPage : public CDialog

Members

Public Constructors

Name

Description

CPropertyPage::CPropertyPage

Constructs a CPropertyPage object.

Public Methods

Name

Description

CPropertyPage::CancelToClose

Changes the OK button to read Close, and disables the Cancel button, after an unrecoverable change in the page of a modal property sheet.

CPropertyPage::Construct

Constructs a CPropertyPage object. Use Construct if you want to specify your parameters at run time, or if you are using arrays.

CPropertyPage::GetPSP

Retrieves the Windows PROPSHEETPAGE structure associated with the CPropertyPage object.

CPropertyPage::OnApply

Called by the framework when the Apply Now button is clicked.

CPropertyPage::OnCancel

Called by the framework when the Cancel button is clicked.

CPropertyPage::OnKillActive

Called by the framework when the current page is no longer the active page. Perform data validation here.

CPropertyPage::OnOK

Called by the framework when the OK, Apply Now, or Close button is clicked.

CPropertyPage::OnQueryCancel

Called by the framework when the Cancel button is clicked, and before the cancel has taken place.

CPropertyPage::OnReset

Called by the framework when the Cancel button is clicked.

CPropertyPage::OnSetActive

Called by the framework when the page is made the active page.

CPropertyPage::OnWizardBack

Called by the framework when the Back button is clicked while using a wizard-type property sheet.

CPropertyPage::OnWizardFinish

Called by the framework when the Finish button is clicked while using a wizard-type property sheet.

CPropertyPage::OnWizardNext

Called by the framework when the Next button is clicked while using a wizard-type property sheet.

CPropertyPage::QuerySiblings

Forwards the message to each page of the property sheet.

CPropertyPage::SetModified

Call to activate or deactivate the Apply Now button.

Public Data Members

Name

Description

CPropertyPage::m_psp

The Windows PROPSHEETPAGE structure. Provides access to basic property page parameters.

Remarks

As with standard dialog boxes, you derive a class from CPropertyPage for each page in your property sheet. To use CPropertyPage-derived objects, first create a CPropertySheet object, and then create an object for each page that goes in the property sheet. Call CPropertySheet::AddPage for each page in the sheet, and then display the property sheet by calling CPropertySheet::DoModal for a modal property sheet, or CPropertySheet::Create for a modeless property sheet.

You can create a type of tab dialog box called a wizard, which consists of a property sheet with a sequence of property pages that guide the user through the steps of an operation, such as setting up a device or creating a newsletter. In a wizard-type tab dialog box, the property pages do not have tabs, and only one property page is visible at a time. Also, instead of having OK and Apply Now buttons, a wizard-type tab dialog box has a Back button, a Next or Finish button, and a Cancel button.

For more information on establishing a property sheet as a wizard, see CPropertySheet::SetWizardMode. For more information on using CPropertyPage objects, see the article Property Sheets and Property Pages.

Inheritance Hierarchy

CObject

CCmdTarget

CWnd

CDialog

CPropertyPage

Requirements

Header: afxdlgs.h

See Also

Reference

CDialog Class

Hierarchy Chart

CPropertySheet Class

CDialog Class

CPropertySheet::SetWizardMode

Concepts

MFC Sample CMNCTRL1

MFC Sample CMNCTRL2

MFC Sample PROPDLG

MFC Sample SNAPVW