TrayIcon.h
资源名称:Visualhk.rar [点击查看]
上传用户:cjw5120
上传日期:2022-05-11
资源大小:5032k
文件大小:2k
源码类别:
网络截获/分析
开发平台:
Visual C++
- /////////////////////////////////////////////////////////////////////////////
- // TrayIcon.h : header file
- //
- #ifndef _INCLUDED_TRAYICON_H_
- #define _INCLUDED_TRAYICON_H_
- /////////////////////////////////////////////////////////////////////////////
- // CTrayIcon window
- class CTrayIcon : public CObject
- {
- // Construction/destruction
- public:
- CTrayIcon();
- CTrayIcon(CWnd* pWnd, UINT uCallbackMessage, LPCTSTR szTip, HICON icon, UINT uID);
- virtual ~CTrayIcon();
- // Operations
- public:
- BOOL Enabled() { return m_bEnabled; }
- BOOL Visible() { return !m_bHidden; }
- //Create the tray icon
- int Create(CWnd* pWnd, UINT uCallbackMessage, LPCTSTR szTip, HICON icon, UINT uID);
- //Change or retrieve the Tooltip text
- BOOL SetTooltipText(LPCTSTR pszTooltipText);
- BOOL SetTooltipText(UINT nID);
- CString GetTooltipText() const;
- //Change or retrieve the icon displayed
- BOOL SetIcon(HICON hIcon);
- BOOL SetIcon(LPCTSTR lpIconName);
- BOOL SetIcon(UINT nIDResource);
- BOOL SetStandardIcon(LPCTSTR lpIconName);
- BOOL SetStandardIcon(UINT nIDResource);
- HICON GetIcon() const;
- void HideIcon();
- void ShowIcon();
- void RemoveIcon();
- void MoveToRight();
- //Change or retrieve the window to send notification messages to
- BOOL SetNotificationWnd(CWnd* pNotifyWnd);
- CWnd* GetNotificationWnd() const;
- //Default handler for tray notification message
- virtual LRESULT OnTrayNotification(WPARAM uID, LPARAM lEvent);
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CTrayIcon)
- //}}AFX_VIRTUAL
- // Implementation
- protected:
- BOOL m_bEnabled; // does O/S support tray icon?
- BOOL m_bHidden; // Has the icon been hidden?
- NOTIFYICONDATA m_tnd;
- DECLARE_DYNAMIC(CTrayIcon)
- };
- #endif
- /////////////////////////////////////////////////////////////////////////////