solnotiicon.h
来自「一个可以实现与SCADA系统实现数据访问,并且通过手机短消息的方式发送到指定手机」· C头文件 代码 · 共 66 行
H
66 行
/*
Module : SolNotiIcon.h
Purpose: Interface for a MFC class to encapsulate Shell_NotifyIcon
Created: Sol 2/18/99
History: None
History: None
Copyright (c) 1997 by Sol.
All rights reserved.
*/
////////////////////////////////// Macros ///////////////////////////
#ifndef _SOLNOTIICON_H__
#define _SOLNOTIICON_H__
/////////////////////////// Classes /////////////////////////////////
class CTrayNotifyIcon : public CObject
{
public:
//Constructors / Destructors
CTrayNotifyIcon();
~CTrayNotifyIcon();
//Create the tray icon
BOOL Create(CWnd* pNotifyWnd, UINT uID, LPCTSTR pszTooltipText, HICON hIcon, UINT nNotifyMessage);
//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;
//Change or retrieve the window to send notification messages to
BOOL SetNotificationWnd(CWnd* pNotifyWnd);
CWnd* GetNotificationWnd() const;
//Remove the tray icon (Called in the destructor anyway)
void RemoveIcon();
//Default handler for tray notification message
virtual LRESULT OnTrayNotification(WPARAM uID, LPARAM lEvent);
protected:
NOTIFYICONDATA m_NotifyIconData;
BOOL m_bCreated;
CWnd* m_pWnd;
DECLARE_DYNAMIC(CTrayNotifyIcon)
};
#endif //_NTRAY_H__
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?