tray.h
来自「《Visual C++编程技巧典型案例解析:基础与应用篇(下)(含1CD-ROM」· C头文件 代码 · 共 38 行
H
38 行
class CZDTray
{
// Private Attributes
private:
int m_nMessageID;
HWND m_hWnd;
// Private Operations
private:
// Performs the actual Add/Modify operation
BOOL DoAddModify(int nTrayIconID, LPCTSTR lpszTitle, int nNewIconID, int nOperation);
// Public Construction/Destruction
public:
// Constructor
CZDTray(HWND hwndParent=NULL, int nMessageID=0);
// Destructor
virtual ~CZDTray();
// Public Operations
public:
// Adds an item to the system tray
BOOL Add(int nTrayIconID, LPCTSTR lpszTitle=NULL);
// Changes the attributes of a system tray item
BOOL Modify(int nTrayIconID, int nNewIconID=0, LPCTSTR lpszTitle=NULL);
// Removes an item from the system tray
BOOL Delete(int nTrayIconID);
// Allows another window to also receive notification messages
void SetNotifyWindow(HWND hwndNotifyWindow, int nMessageID)
{ m_hWnd = hwndNotifyWindow; m_nMessageID = nMessageID; }
};
/////////////////////////////////////////////////////////////////////////////
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?