CMFCDesktopAlertWndButton Class
The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.
The latest version of this topic can be found at CMFCDesktopAlertWndButton Class.
Allows buttons to be added to a desktop alert dialog box.
Syntax
class CMFCDesktopAlertWndButton : public CMFCButton
Members
Public Constructors
Name | Description |
CMFCDesktopAlertWndButton::CMFCDesktopAlertWndButton |
Default constructor. |
CMFCDesktopAlertWndButton::~CMFCDesktopAlertWndButton |
Destructor. |
Public Methods
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. |
Data Members
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. |
Remarks
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.
Example
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.
CMFCDesktopAlertWndButton m_btnFlag;
m_btnFlag.SetImage (IDB_FLAG);
Inheritance Hierarchy
Requirements
Header: afxdesktopalertwnd.h
CMFCDesktopAlertWndButton::IsCaptionButton
Determines whether the button is displayed in the caption area of the alert dialog box.
BOOL IsCaptionButton() const;
Return Value
Nonzero if the button is displayed in the caption area of the alert dialog box; otherwise, 0.
CMFCDesktopAlertWndButton::IsCloseButton
Determines whether the button closes the alert dialog box.
BOOL IsCloseButton() const;
Return Value
Nonzero if the button closes the alert dialog box; otherwise, 0.