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.
Syntax
class CMFCDesktopAlertWndInfo
Members
Public Constructors
Name | Description |
---|---|
CMFCDesktopAlertWndInfo::~CMFCDesktopAlertWndInfo |
Destructor. |
Public Methods
Name | Description |
---|---|
CMFCDesktopAlertWndInfo::operator= |
Data Members
Name | Description |
---|---|
CMFCDesktopAlertWndInfo::m_hIcon | A handle to the icon that is displayed. |
CMFCDesktopAlertWndInfo::m_nURLCmdID | The command ID associated with a link on the desktop alert window. |
CMFCDesktopAlertWndInfo::m_strText | The text that is displayed on the desktop alert window. |
CMFCDesktopAlertWndInfo::m_strURL | The link that is displayed on the desktop alert window. |
Remarks
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:
An icon, which is set by calling CMFCDesktopAlertWndInfo::m_hIcon.
A label, or text message, which is set by calling CMFCDesktopAlertWndInfo::m_strText.
A link, which is set by calling CMFCDesktopAlertWndInfo::m_strURL. To set the command that is executed when the link is clicked, call CMFCDesktopAlertWndInfo::m_nURLCmdID.
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.
Example
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;
Inheritance Hierarchy
Requirements
Header: afxDesktopAlertDialog.h
CMFCDesktopAlertWndInfo::operator=
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
CMFCDesktopAlertWndInfo::m_hIcon
A handle to the icon that is displayed.
HICON m_hIcon;
Remarks
CMFCDesktopAlertWndInfo::m_nURLCmdID
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.
CMFCDesktopAlertWndInfo::m_strText
The text that is displayed on the desktop alert window.
CString m_strText;
Remarks
CMFCDesktopAlertWndInfo::m_strURL
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.
See also
Hierarchy Chart
Classes
CMFCDesktopAlertWnd Class
CMFCDesktopAlertWnd::Create
CMFCDesktopAlertDialog Class