允许按钮添加到桌面通知对话框。
class CMFCDesktopAlertWndButton : public CMFCButton
成员
公共构造函数
名称 |
说明 |
CMFCDesktopAlertWndButton::CMFCDesktopAlertWndButton |
默认构造函数。 |
CMFCDesktopAlertWndButton::~CMFCDesktopAlertWndButton |
析构函数。 |
公共方法
名称 |
说明 |
确定按钮是否在通知对话框的声明区域中显示。 |
|
确定按钮是否关闭警报对话框。 |
数据成员
名称 |
说明 |
CMFCDesktopAlertWndButton::m_bIsCaptionButton |
指定的布尔值按钮是否在通知对话框的声明区域中显示。 |
CMFCDesktopAlertWndButton::m_bIsCloseButton |
指定的布尔值按钮是否关闭警报对话框。 |
备注
默认情况下,该构造函数将 m_bIsCaptionButton 和 m_bIsCloseButton 数据成员设置为 FALSE。如果按钮在通知对话框的声明区域,确定父 CMFCDesktopAlertDialog 对象设置 m_bIsCaptionButton 到 TRUE。CMFCDesktopAlertDialog 选件类创建用作按钮关闭警报对话框并设置 m_bIsCloseButton 到 TRUE的一 CMFCDesktopAlertWndButton 对象。
因为这样做会将所有按钮,请向 CMFCDesktopAlertDialog 对象的 CMFCDesktopAlertWndButton 对象。有关 CMFCDesktopAlertDialog的更多信息,请参见CMFCDesktopAlertDialog选件类。
示例
下面的示例在 CMFCDesktopAlertWndButton 选件类演示如何使用 SetImage 方法。此代码段是 桌面通知演示示例的一部分。
CMFCDesktopAlertWndButton m_btnFlag;
...
m_btnFlag.SetImage (IDB_FLAG);
继承层次结构
要求
标头: afxdesktopalertwnd.h