共用方式為


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

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:

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

CMFCDesktopAlertWndInfo

Requirements

Header: afxDesktopAlertDialog.h

See Also

Reference

Hierarchy Chart

CMFCDesktopAlertWnd Class

CMFCDesktopAlertWnd::Create

CMFCDesktopAlertDialog Class

Other Resources

MFC Classes