dwMessage
[in] Variable of type DWORD that specifies the action to be taken. It can have one of the following values.
NIM_ADD
Adds an icon to the status area. The hWnd and uID members of the NOTIFYICONDATA structure pointed to by lpdata will be used to identify the icon in later calls to Shell_NotifyIcon.
NIM_DELETE
Deletes an icon from the status area. Use the hWnd and uID members of the NOTIFYICONDATA structure pointed to by lpdata to identify the icon to be deleted.
NIM_MODIFY
Modifies an icon in the status area. Use the hWnd and uID members of the NOTIFYICONDATA structure pointed to by lpdata to identify the icon to be modified.
NIM_SETFOCUS
Version 5.0. Returns focus to the taskbar notification area. Taskbar icons should use this message when they have completed their user interface operation. For example, if the taskbar icon displays a shortcut menu, but the user presses ESC to cancel it, use NIM_SETFOCUS to return focus to the taskbar notification area.
NIM_SETVERSION
Version 5.0. Instructs the taskbar to behave according to the version number specified in the uVersion member of the structure pointed to by lpdata. This message allows you to specify whether you want the version 5.0 behavior found on Microsoft Windows 2000 systems, or that found with earlier Shell versions. The default value for uVersion is zero, indicating that the original Windows 95 notify icon behavior should be used. For details, see the Remarks section.
lpdata
[in] Pointer to a NOTIFYICONDATA structure. The content of the structure depends on the value of dwMessage.
dwMessage
[in] Variable of type DWORD that specifies the action to be taken. It can have one of the following values.
dwMessage 是个Dword型数据,指定了执行该函数后的行为,它有如下几个值:NIM_ADD,NIM_DELETE,NIM_MODIFY,NIM_SETFOCUS,NIM_SETVERSION
NIM_ADD
Adds an icon to the status area. The hWnd and uID members of the NOTIFYICONDATA structure pointed to by lpdata will be used to identify the icon in later calls to Shell_NotifyIcon.
NIM_ADD:在状态区(就是右下角托盘区)增加一个图标,在以后调用Shell_NotifyIcon函数时,由指针lpdata指向的NOTIFYICONDATA 结构体成员hwnd,uID将用来标识这个图标。
NIM_DELETE
Deletes an icon from the status area. Use the hWnd and uID members of the NOTIFYICONDATA structure pointed to by lpdata to identify the icon to be deleted.
NIM_DELETE:从托盘区删除那个指定的图标(注明:当程序退出时,必须调用这个函数,删除在托盘中的图标)
NIM_MODIFY
Modifies an icon in the status area. Use the hWnd and uID members of the NOTIFYICONDATA structure pointed to by lpdata to identify the icon to be modified.
NIM_MODIFY:在托盘区变更指定的图标(有些软件在托盘区的图标会闪动,如接受鼠标事件,显示不同的图标)
下面两个值用得少,就不解释了。英文水平差。
NIM_SETFOCUS
Version 5.0. Returns focus to the taskbar notification area. Taskbar icons should use this message when they have completed their user interface operation. For example, if the taskbar icon displays a shortcut menu, but the user presses ESC to cancel it, use NIM_SETFOCUS to return focus to the taskbar notification area.
NIM_SETVERSION
Version 5.0. Instructs the taskbar to behave according to the version number specified in the uVersion member of the structure pointed to by lpdata. This message allows you to specify whether you want the version 5.0 behavior found on Microsoft Windows 2000 systems, or that found with earlier Shell versions. The default value for uVersion is zero, indicating that the original Windows 95 notify icon behavior should be used. For details, see the Remarks section.
lpdata
[in] Pointer to a NOTIFYICONDATA structure. The content of the structure depends on the value of dwMessage
lpdata:指向NOTIFYICONDATA结构体,这个结构体中的内容,依据dwMessage的值不同而不同。