Several members of this structure are only supported for Windows 2000 and later. To enable these members, include one of the following lines in your header:
Windows Vista and later:
#define NTDDI_VERSION NTDDI_WIN2K
#define NTDDI_VERSION NTDDI_WINXP
#define NTDDI_VERSION NTDDI_VISTA
Windows XP and earlier:
#define _WIN32_IE 0x0500
#define _WIN32_IE 0x0600
You can maintain application compatibility with all Shell32.dll versions while still using the current header files by setting the size of the NOTIFYICONDATA structure appropriately. Before you initialize the structure, use DllGetVersion to determine which Shell32.dll version is installed on the system and initialize cbSize with one of these values:
Shell32.dll Version cbSize
6.0.6 or higher (Windows Vista and later) sizeof(NOTIFYICONDATA)
6.0 (Windows XP) NOTIFYICONDATA_V3_SIZE
5.0 (Windows 2000) NOTIFYICONDATA_V2_SIZE
Versions lower than 5.0 NOTIFYICONDATA_V1_SIZE
如果mz_dong兄在WIN7测试成功的话,那就应该是系统版本支持问题,修改_WIN32_WINNT定义如下
C/C++ code
//XP 0x0501
#define _WIN32_WINNT 0x0501