Share via


CPropertySheet::SetTitle

void SetTitle( LPCTSTR lpszText**, UINT** nStyle = 0);

Parameters

nStyle

Specifies the style of the property sheet title. The style must be specified at 0 or as PSH_PROPTITLE. If the style is set as PSH_PROPTITLE, the words "Properties for" appear before the text specified as the caption.

lpszText

Points to the text to be used as the caption in the title bar of the property sheet.

Remarks

Call this member function to specify the property sheet's caption (the text displayed in the title bar of a frame window).

By default, a property sheet uses the caption parameter in the property sheet constructor.

Example

// Declare a CPropertySheet object with a caption "Simple PropertySheet".
CPropertySheet dlgPropertySheet("Simple PropertySheet");

// Add two pages to the CPropertySheet object. Both CStylePage and
// CColorPage are CPropertyPage-derived classes created
// by ClassWizard.
CStylePage     stylePage;
CColorPage     colorPage;
dlgPropertySheet.AddPage(&stylePage);
dlgPropertySheet.AddPage(&colorPage);

// Change the caption of the CPropertySheet object
// from "Simple PropertySheet" to "Simple Properties".
dlgPropertySheet.SetTitle("Simple", PSH_PROPTITLE);

// Show the CPropertySheet object as MODAL.
dlgPropertySheet.DoModal();

CPropertySheet OverviewClass MembersHierarchy Chart

See Also   CPropertySheet::GetPage, CPropertySheet::GetActivePage