Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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
Members
Public Constructors
| Name | Description | 
|---|---|
| CMFCDesktopAlertWndInfo::~CMFCDesktopAlertWndInfo | Destructor. | 
Public Methods
| Name | Description | 
|---|---|
| 
 | 
Data Members
| Name | Description | 
|---|---|
| A handle to the icon that is displayed. | |
| The command ID associated with a link on the desktop alert window. | |
| The text that is displayed on the desktop alert window. | |
| 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 DesktopAlertDemo Sample: MFC Desktop Alert Application.
       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