Shell_NotifyIcon

 

 

Shell_NotifyIcon

 

This function sends a message to the system to add, modify, or delete an icon from the taskbar status area.

Syntax
WINSHELLAPI BOOL WINAPI Shell_NotifyIcon(
  DWORD dwMessage, 
  PNOTIFYICONDATA pnid 
);
Parameters
dwMessage
[in] Specifies the message value to send. The following table shows the possible values.
ValueDescription
NIM_ADDAdds an icon to the status area.
NIM_DELETEDeletes an icon from the status area.
NIM_MODIFYModifies an icon in the status area.
pnid
[in] Pointer to a NOTIFYICONDATA structure. The content of the structure depends on the value of dwMessage.
Return Values

Nonzero indicates success. Zero indicates failure.

Code Example

The following code example demonstrates how to use Shell_NotifyIcon.

Note   To make the following code example easier to read, security checking and error handling are not included. This code example should not be used in a release configuration unless it has been modified to include them.
 
Requirements

OS Versions: Windows CE 1.0 and later.
Header: Shellapi.h.

 

 

 

 

 

 

NOTIFYICONDATA

 

This structure contains information that the system needs to process taskbar status area messages.

Syntax
typedef struct _NOTIFYICONDATA { 
  DWORD cbSize;
  HWND hWnd; 
  UINT uID; 
  UINT uFlags; 
  UINT uCallbackMessage; 
  HICON hIcon; 
  WCHAR szTip[64]; 
} NOTIFYICONDATA, *PNOTIFYICONDATA;
Members
cbSize
Size of this structure, in bytes.
hWnd
Handle to the window that receives notification messages associated with an icon in the taskbar status area.
uID
Application-defined identifier of the taskbar icon. Values from 0 to 12 are reserved and should not be used.
uFlags
Array of flags that indicate which of the other members contain valid data. This member can be a combination of the values in the following table.
ValueDescription
NIF_ICONThe hIcon member is valid.
NIF_MESSAGEThe uCallbackMessage member is valid.
NIF_TIPThe szTip member is valid.
uCallbackMessage
Application-defined message identifier. The system uses this identifier for notification messages that it sends to the window identified in hWnd. These notifications are sent when a mouse event occurs in the bounding rectangle of the icon.
hIcon
Handle to the icon to add, modify, or delete.
szTip
Null-terminated string that contains ToolTip text to display for the icon.
Requirements

OS Versions: Windows CE 1.0 and later.
Header: Shellapi.h.

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值