共用方式為


CMFCPropertyGridColorProperty 類別

CMFCPropertyGridColorProperty 類別支援開啟色彩選取對話方塊的屬性清單控制項項目。

class CMFCPropertyGridColorProperty : public CMFCPropertyGridProperty

Members

Bb983980.collapse_all(zh-tw,VS.110).gif公用建構函式

名稱

描述

CMFCPropertyGridColorProperty::CMFCPropertyGridColorProperty

建構 CMFCPropertyGridColorProperty 物件。

CMFCPropertyGridColorProperty::~CMFCPropertyGridColorProperty

解構函式。

Bb983980.collapse_all(zh-tw,VS.110).gif公用方法

名稱

描述

CMFCPropertyGridColorProperty::EnableAutomaticButton

啟用色彩選取對話方塊中的 按鈕。 (標準按鈕自動標記為 [自動])。

CMFCPropertyGridColorProperty::EnableOtherButton

啟用色彩選取對話方塊的 另一個 按鈕。 (這個標準其他按鈕標記 [更多色彩…])。

CMFCPropertyGridColorProperty::FormatProperty

格式化屬性值的文字表示。 (覆寫 CMFCPropertyGridProperty::FormatProperty)。

CMFCPropertyGridColorProperty::GetColor

取得屬性的目前色彩。

CMFCPropertyGridColorProperty::GetThisClass

由框架以取得指向與這個類別型別的 CRuntimeClass 物件。

CMFCPropertyGridColorProperty::OnClickButton

呼叫框架,當使用者按一下屬性中的按鈕。 (覆寫 CMFCPropertyGridProperty::OnClickButton)。

CMFCPropertyGridColorProperty::OnDrawValue

呼叫框架中顯示屬性值。 (覆寫 CMFCPropertyGridProperty::OnDrawValue)。

CMFCPropertyGridColorProperty::OnEdit

呼叫框架,當使用者將修改屬性值。 (覆寫 CMFCPropertyGridProperty::OnEdit)。

CMFCPropertyGridColorProperty::OnUpdateValue

呼叫框架,在可編輯的屬性值變更。 (覆寫 CMFCPropertyGridProperty::OnUpdateValue)。

CMFCPropertyGridColorProperty::SetColor

設定屬性的新色彩。

CMFCPropertyGridColorProperty::SetColumnsNumber

在目前的色彩屬性方格來指定欄數。

備註

CMFCPropertyGridColorProperty 類別支援可加入至屬性清單控制項的色彩屬性。 如需詳細資訊,請參閱 CMFCPropertyGridCtrl 類別

範例

您可以使用 CMFCPropertyGridColorProperty 類別的各種方法在下列範例中,會示範如何建構物件 CMFCPropertyGridColorProperty 類別和處置這個物件。 程式碼說明如何啟用自動和其他按鈕以及如何設定色彩和資料行編號。 這個範例是 新的控制項範例的一部分。

    CMFCPropertyGridColorProperty* pColorProp = new CMFCPropertyGridColorProperty(_T("Window Color"), RGB(210, 192, 254), NULL, _T("Specifies the default dialog color"));
    pColorProp->EnableOtherButton(_T("Other..."));
    pColorProp->EnableAutomaticButton(_T("Default"), ::GetSysColor(COLOR_3DFACE));
    pColorProp->SetColor(RGB(255,0,0));
    pColorProp->SetColumnsNumber(3);

繼承階層架構

CObject

   CMFCPropertyGridProperty

      CMFCPropertyGridColorProperty

需求

標題: afxpropertygridctrl.h

請參閱

參考

階層架構圖

CMFCPropertyGridCtrl 類別

CMFCPropertyGridProperty 類別

其他資源

MFC 類別