CMFCDesktopAlertWndInfo 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 CMFCDesktopAlertWndInfo Class.

The CMFCDesktopAlertWndInfo class is used with the CMFCDesktopAlertWnd Class. It specifies the controls that are displayed if the desktop alert window pops up.

class CMFCDesktopAlertWndInfo  

Public Constructors

NameDescription
CMFCDesktopAlertWndInfo::~CMFCDesktopAlertWndInfoDestructor.

Public Methods

NameDescription
CMFCDesktopAlertWndInfo::operator=

Data Members

NameDescription
CMFCDesktopAlertWndInfo::m_hIconA handle to the icon that is displayed.
CMFCDesktopAlertWndInfo::m_nURLCmdIDThe command ID associated with a link on the desktop alert window.
CMFCDesktopAlertWndInfo::m_strTextThe text that is displayed on the desktop alert window.
CMFCDesktopAlertWndInfo::m_strURLThe link that is displayed on the desktop alert window.

The CMFCDesktopAlertWndInfo class is passed to the CMFCDesktopAlertWnd::Create method to specify the elements that are displayed on the default dialog of the desktop alert window. The default dialog can contain three items:

If the default dialog is not sufficient, you can create a custom dialog and pass it to the CMFCDesktopAlertWnd::Create method instead of using this class. For more information, see CMFCDesktopAlertDialog Class.

The following example demonstrates how to use various members in the CMFCDesktopAlertWndInfo class. The example demonstrates how to set the handle to the icon that is displayed, the text that is displayed on the desktop alert window, the link that is displayed on the desktop alert window, and the command ID that is associated with a link on the desktop alert window. This example is part of the Desktop Alert Demo sample.

		CMFCDesktopAlertWndInfo params;
		// int m_nIcon
		if (m_nIcon > 0)
		{
			// CMFCToolBarImages m_Icons
			params.m_hIcon = m_Icons.ExtractIcon (m_nIcon - 1);
		}

		// CString	m_strText
		params.m_strText = m_strText;
		// CString	m_strLink
		params.m_strURL = m_strLink;
		params.m_nURLCmdID = 101;

CMFCDesktopAlertWndInfo

Header: afxDesktopAlertDialog.h

This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

CMFCDesktopAlertWndInfo& operator=(CMFCDesktopAlertWndInfo& src);

Parameters

[in] src

Return Value

Remarks

A handle to the icon that is displayed.

HICON m_hIcon;  

Remarks

The command ID associated with a link on the desktop alert window.

UINT m_nURLCmdID;  

Remarks

The command ID is sent to the owner of the popup window when the user clicks on the link specified by CMFCDesktopAlertWndInfo::m_strURL.

The text that is displayed on the desktop alert window.

CString m_strText;  

Remarks

The link that is displayed on the desktop alert window.

CString m_strURL;  

Remarks

When the user clicks the link, the command that has the CMFCDesktopAlertWndInfo::m_nURLCmdID command ID will be sent to the owner of the pop-up window.

Hierarchy Chart
Classes
CMFCDesktopAlertWnd Class
CMFCDesktopAlertWnd::Create
CMFCDesktopAlertDialog Class

Show: