description | title | ms.date | f1_keywords | helpviewer_keywords | ms.assetid | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Learn more about: CMFCDesktopAlertWndButton Class |
CMFCDesktopAlertWndButton Class |
11/04/2016 |
|
|
df39a0c8-0c39-4ab0-8c64-78c5b2c4ecaf |
Allows buttons to be added to a desktop alert dialog box.
class CMFCDesktopAlertWndButton : public CMFCButton
Name | Description |
---|---|
CMFCDesktopAlertWndButton::CMFCDesktopAlertWndButton |
Default constructor. |
CMFCDesktopAlertWndButton::~CMFCDesktopAlertWndButton |
Destructor. |
Name | Description |
---|---|
CMFCDesktopAlertWndButton::IsCaptionButton | Determines whether the button is displayed in the caption area of the alert dialog box. |
CMFCDesktopAlertWndButton::IsCloseButton | Determines whether the button closes the alert dialog box. |
Name | Description |
---|---|
CMFCDesktopAlertWndButton::m_bIsCaptionButton |
A Boolean value that specifies whether the button is displayed in the caption area of the alert dialog box. |
CMFCDesktopAlertWndButton::m_bIsCloseButton |
A Boolean value that specifies whether the button closes the alert dialog box. |
By default, the constructor sets the m_bIsCaptionButton
and m_bIsCloseButton
data members to FALSE. The parent CMFCDesktopAlertDialog
object sets m_bIsCaptionButton
to TRUE if the button is positioned in the caption area of the alert dialog box. The CMFCDesktopAlertDialog
class creates a CMFCDesktopAlertWndButton
object that serves as the button that closes the alert dialog box and sets m_bIsCloseButton
to TRUE.
Add CMFCDesktopAlertWndButton
objects to a CMFCDesktopAlertDialog
object as you would add any button. For more information about CMFCDesktopAlertDialog
, see CMFCDesktopAlertDialog Class.
The following example demonstrates how to use the SetImage
method in the CMFCDesktopAlertWndButton
class. This code snippet is part of the Desktop Alert Demo sample.
[!code-cppNVC_MFC_DesktopAlertDemo#4] [!code-cppNVC_MFC_DesktopAlertDemo#5]
Header: afxdesktopalertwnd.h
Determines whether the button is displayed in the caption area of the alert dialog box.
BOOL IsCaptionButton() const;
Nonzero if the button is displayed in the caption area of the alert dialog box; otherwise, 0.
Determines whether the button closes the alert dialog box.
BOOL IsCloseButton() const;
Nonzero if the button closes the alert dialog box; otherwise, 0.