Skip to content

Latest commit

 

History

History
101 lines (64 loc) · 3.79 KB

cmfcdesktopalertwndbutton-class.md

File metadata and controls

101 lines (64 loc) · 3.79 KB
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: CMFCDesktopAlertWndButton Class
CMFCDesktopAlertWndButton Class
11/04/2016
CMFCDesktopAlertWndButton
AFXDESKTOPALERTWND/CMFCDesktopAlertWndButton
AFXDESKTOPALERTWND/CMFCDesktopAlertWndButton::IsCaptionButton
AFXDESKTOPALERTWND/CMFCDesktopAlertWndButton::IsCloseButton
CMFCDesktopAlertWndButton [MFC], IsCaptionButton
CMFCDesktopAlertWndButton [MFC], IsCloseButton
df39a0c8-0c39-4ab0-8c64-78c5b2c4ecaf

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.

[!code-cppNVC_MFC_DesktopAlertDemo#4] [!code-cppNVC_MFC_DesktopAlertDemo#5]

Inheritance Hierarchy

CObject

CCmdTarget

CWnd

CButton

CMFCButton

CMFCDesktopAlertWndButton

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.

See also

Hierarchy Chart
Classes
CMFCDesktopAlertDialog Class