SystemIcon.h
资源名称:酒店管理系统源代码.rar [点击查看]
上传用户:czfddz
上传日期:2013-03-20
资源大小:1517k
文件大小:2k
源码类别:
酒店行业
开发平台:
C/C++
- // SystemIcon.h: interface for the CSystemIcon class.
- //类的功能:实现应用程序的托盘显示和编辑
- //////////////////////////////////////////////////////////////////////
- #if !defined(AFX_SYSTEMICON_H__60A44383_E826_4A09_942C_2FE2AB495B46__INCLUDED_)
- #define AFX_SYSTEMICON_H__60A44383_E826_4A09_942C_2FE2AB495B46__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- class CSystemIcon : public CObject
- {
- public:
- CSystemIcon();
- CSystemIcon(CWnd* pWnd, UINT uCallbackMessage, LPCTSTR szTip, HICON icon, UINT uID);
- virtual ~CSystemIcon();
- public:
- BOOL Enabled() { return m_bEnabled; }
- BOOL Visible() { return !m_bHidden; }
- //创建系统图标
- Create(CWnd* pWnd, UINT uCallbackMessage, LPCTSTR szTip, HICON icon, UINT uID);
- //关于提示文本
- BOOL SetTooltipText(LPCTSTR pszTooltipText);
- BOOL SetTooltipText(UINT nID);
- CString GetTooltipText() const;
- //关于图标
- 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 DeleteIcon();
- //关于通知窗口
- BOOL SetNotificationWnd(CWnd* pNotifyWnd);
- CWnd* GetNotificationWnd() const;
- //自定义消息处理函数
- virtual LRESULT OnIconNotification(WPARAM uID, LPARAM lEvent);
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CSystemIcon)
- //}}AFX_VIRTUAL
- // Implementation
- protected:
- BOOL m_bEnabled; //是否支持图标
- BOOL m_bHidden; //是否隐藏图标
- NOTIFYICONDATA m_tnd; //数据结构
- DECLARE_DYNAMIC(CSystemIcon)
- };
- #endif // !defined(AFX_SYSTEMICON_H__60A44383_E826_4A09_942C_2FE2AB495B46__INCLUDED_)