CPropertySheet::Construct

void Construct( UINT nIDCaption**, CWnd*** pParentWnd = NULL, UINT iSelectPage = 0 );

void Construct( LPCTSTR pszCaption**, CWnd*** pParentWnd = NULL, UINT iSelectPage = 0 );

Parameters

nIDCaption

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

pParentWnd

Pointer 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

Pointer to a string containing the caption to be used for the property sheet. Cannot be NULL.

Remarks

Call this member function to construct a CPropertySheet object. Call this member function if one of the class constructors has not already been called. For example, call Construct when you declare or allocate arrays of CPropertySheet objects. In the case of  arrays, you must call Construct for each member in the array.

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.

Example

The following example demonstrates under what circumstances you would call Construct.

int i;
CPropertySheet   grpropsheet[4];
CPropertySheet   someSheet;   // no need to call Construct for this one

UINT rgID[4] = {IDD_SHEET1, IDD_SHEET2, IDD_SHEET3, IDD_SHEET4};

for (i = 0; i < 4; i++)
    grpropsheet[i].Construct(rgID[i]);

Example

The following example demonstrates under what circumstances you would call Construct.

int i;
CPropertySheet   grpropsheet[4];
CPropertySheet   someSheet;   // no need to call Construct for this one

UINT rgID[4] = {IDD_SHEET1, IDD_SHEET2, IDD_SHEET3, IDD_SHEET4};

for (i = 0; i < 4; i++)
    grpropsheet[i].Construct(rgID[i]);

CPropertySheet OverviewClass MembersHierarchy Chart

See Also   CPropertySheet::CPropertySheet, CPropertySheet::DoModal, CPropertySheet::Create