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.

class CMFCDesktopAlertWndButton : public CMFCButton  

Public Constructors

NameDescription
CMFCDesktopAlertWndButton::CMFCDesktopAlertWndButtonDefault constructor.
CMFCDesktopAlertWndButton::~CMFCDesktopAlertWndButtonDestructor.

Public Methods

NameDescription
CMFCDesktopAlertWndButton::IsCaptionButtonDetermines whether the button is displayed in the caption area of the alert dialog box.
CMFCDesktopAlertWndButton::IsCloseButtonDetermines whether the button closes the alert dialog box.

Data Members

NameDescription
CMFCDesktopAlertWndButton::m_bIsCaptionButtonA Boolean value that specifies whether the button is displayed in the caption area of the alert dialog box.
CMFCDesktopAlertWndButton::m_bIsCloseButtonA 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.

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);

CObject

CCmdTarget

CWnd

CButton

CMFCButton

CMFCDesktopAlertWndButton

Header: afxdesktopalertwnd.h

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.

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.

Hierarchy Chart
Classes
CMFCDesktopAlertDialog Class

Show: