共用方式為


CMFCDesktopAlertWndButton 類別

允許將按鈕新增至桌面警示對話方塊。

語法

class CMFCDesktopAlertWndButton : public CMFCButton

成員

公用建構函式

名稱 描述
CMFCDesktopAlertWndButton::CMFCDesktopAlertWndButton 預設建構函式。
CMFCDesktopAlertWndButton::~CMFCDesktopAlertWndButton 解構函式。

公用方法

名稱 描述
CMFCDesktopAlertWndButton::IsCaptionButton 判斷按鈕是否顯示在警示對話方塊的 [標題] 區域中。
CMFCDesktopAlertWndButton::IsCloseButton 判斷按鈕是否關閉警示對話方塊。

資料成員

名稱 描述
CMFCDesktopAlertWndButton::m_bIsCaptionButton 布林值,指定按鈕是否顯示在警示對話方塊標題區域中。
CMFCDesktopAlertWndButton::m_bIsCloseButton 布林值,指定按鈕是否關閉警示對話方塊。

備註

根據預設,建構函式會將 m_bIsCaptionButtonm_bIsCloseButton 資料成員設定為 FALSE。 如果按鈕位於警示對話方塊的 [標題] 區域中,父 CMFCDesktopAlertDialog 物件就會設定 m_bIsCaptionButton 為 TRUE。 類別 CMFCDesktopAlertDialogCMFCDesktopAlertWndButton 建立 物件,做為關閉警示對話方塊並設定 m_bIsCloseButton 為 TRUE 的按鈕。

將物件新增 CMFCDesktopAlertWndButtonCMFCDesktopAlertDialog 物件,就像新增任何按鈕一樣。 如需 的詳細資訊 CMFCDesktopAlertDialog ,請參閱 CMFCDesktopAlertDialog 類別

範例

下列範例示範如何在 類別中使用 SetImageCMFCDesktopAlertWndButton 方法。 此程式碼片段是桌面警示示範範例 一部分。

CMFCDesktopAlertWndButton m_btnFlag;
m_btnFlag.SetImage(IDB_FLAG);

繼承階層架構

CObject

CCmdTarget

CWnd

CButton

CMFCButton

CMFCDesktopAlertWndButton

需求

標頭: afxdesktopalertwnd.h

CMFCDesktopAlertWndButton::IsCaptionButton

判斷按鈕是否顯示在警示對話方塊的 [標題] 區域中。

BOOL IsCaptionButton() const;

傳回值

如果按鈕顯示在警示對話方塊的 [標題] 區域中,則為非零;否則為 0。

CMFCDesktopAlertWndButton::IsCloseButton

判斷按鈕是否關閉警示對話方塊。

BOOL IsCloseButton() const;

傳回值

如果按鈕關閉警示對話方塊,則為非零;否則為 0。

另請參閱

階層架構圖表
類別
CMFCDesktopAlertDialog 類別