⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tray.h

📁 这是书上的代码
💻 H
字号:

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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -