共用方式為


CPropertySheet::SetTitle

指定屬性工作表的標頭檔 (在框架視窗的標題列中顯示的文字。

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

參數

  • nStyle
    指定屬性工作表標題的樣式。 您必須指定這個樣式在 0 或做為 PSH_PROPTITLE。 如果樣式設定為, PSH_PROPTITLE「Property」這個字做為在標頭中指定的文字之後。 例如,呼叫 SetTitle(「中的」, PSH_PROPTITLE) 會產生「簡單屬性的屬性工作表標題」。

  • lpszText
    做為標題之文字的點在屬性工作表的標題列。

備註

根據預設,屬性工作表在屬性工作表建構函式使用標頭參數。

範例

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

// Add three pages to the CPropertySheet object. CStylePage, CColorPage, 
// and CShapePage are CPropertyPage-derived classes created 
// by the Add Class wizard.
CStylePage     stylePage;
CColorPage     colorPage;
CShapePage     shapePage;
dlgPropertySheet.AddPage(&stylePage);
dlgPropertySheet.AddPage(&colorPage);
dlgPropertySheet.AddPage(&shapePage);

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

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

需求

Header: afxdlgs.h

請參閱

參考

CPropertySheet 類別

階層架構圖表

CPropertySheet::GetPage

CPropertySheet::GetActivePage