Partilhar via


CPropertySheet::CPropertySheet

Constructs a CPropertySheet object.

CPropertySheet( ); 
explicit CPropertySheet(
   UINT nIDCaption,
   CWnd* pParentWnd = NULL,
   UINT iSelectPage = 0 
);
explicit CPropertySheet(
   LPCTSTR pszCaption,
   CWnd* pParentWnd = NULL,
   UINT iSelectPage = 0 
);
CPropertySheet(
   UINT nIDCaption,
   CWnd* pParentWnd,
   UINT iSelectPage,
   HBITMAP hbmWatermark,
   HPALETTE hpalWatermark = NULL,
   HBITMAP hbmHeader = NULL 
);
CPropertySheet(
   LPCTSTR pszCaption,
   CWnd* pParentWnd,
   UINT iSelectPage,
   HBITMAP hbmWatermark,
   HPALETTE hpalWatermark = NULL,
   HBITMAP hbmHeader = NULL 
);

Parameters

  • nIDCaption
    ID of the caption to be used for the property sheet.

  • pParentWnd
    Points to the parent window of the property sheet. If NULL, the parent window will be the main window of the application.

  • iSelectPage
    The index of the page that will initially be on top. Default is the first page added to the sheet.

  • pszCaption
    Points to a string containing the caption to be used for the property sheet. Cannot be NULL.

  • hbmWatermark
    A handle to the background bitmap of the property sheet.

  • hpalWatermark
    A handle to the palette of the watermark bitmap and/or header bitmap.

  • hbmHeader
    A handle to the header bitmap of the property page.

Remarks

To display the property sheet, call DoModal or Create. The string contained in the first parameter will be placed in the caption bar for the property sheet.

If you have multiple parameters (for example, if you are using an array), use Construct instead of CPropertySheet.

You can display watermark and/or header images automatically if you use the third or fourth prototypes of CPropertySheet, above, and you pass valid values for the hbmWatermark, hpalWatermark, and/or hbmHeader parameters.

Example

// Declare a CPropertySheet object titled "Simple PropertySheet".
CPropertySheet dlgPropertySheet1(_T("Simple PropertySheet"));

// Declare a CPropertySheet object whose title is specified in the
// IDS_PROPERTYSHEET_TITLE string resource, and the second page is
// initially on top.  
CPropertySheet dlgPropertySheet2(IDS_PROPERTYSHEET_TITLE, this, 1);

Requirements

Header: afxdlgs.h

See Also

Reference

CPropertySheet Class

Hierarchy Chart

CPropertySheet::Construct

CPropertySheet::DoModal

CPropertySheet::Create

CPropertyPage::CPropertyPage

Other Resources

CPropertySheet Members