CPropertySheet::SetTitle

更新 : 2007 年 11 月

プロパティ シートのキャプション (フレーム ウィンドウのタイトル バーに表示されるテキスト) を指定します。

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

パラメータ

  • nStyle
    プロパティ シート タイトルのスタイルを指定します。スタイルには 0 または PSH_PROPTITLE を指定します。スタイルとして PSH_PROPTITLE を設定すると、キャプションとして指定されるテキストの後に単語 "Properties" が表示されます。たとえば、SetTitle("Simple", PSH_PROPTITLE) を呼び出すと、プロパティ シートのキャプションは "Simple Properties." と表示されます。

  • 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();

必要条件

ヘッダー : afxdlgs.h

参照

参照

CPropertySheet クラス

階層図

CPropertySheet::GetPage

CPropertySheet::GetActivePage

その他の技術情報

CPropertySheet のメンバ