This is the code for Windows XP

Code:
#define _WIN32_IE 0x0600

// ...
#include <shellapi.h>

// ...
NOTIFYICONDATA nid = { 0 };

// ...
nid.cbSize = sizeof( NOTIFYICONDATA );
nid.dwInfoFlags = NIIF_ERROR;
nid.hIcon = ::LoadIcon( NULL, IDI_HAND );
nid.hWnd = hWnd;
strcpy( nid.szInfo, "balloon text" );
strcpy( nid.szInfoTitle, "balloon title" );
strcpy( nid.szTip, "tip text" );
nid.uCallbackMessage = WM_USER + 10;
nid.uFlags = NIF_ICON | NIF_TIP | NIF_MESSAGE | NIF_INFO;
nid.uID = 1010;
nid.uTimeout = 15000;
Shell_NotifyIcon( NIM_ADD, &nid );
When I use NID in Win2k I just change .cbSize to NOTIFYICONDATA_V2_SIZE

The timeout for balloon doesn't work in Windows XP, and works properly in Win2k. What's my prtoblem, what am I doing wrong???

Please help!!!

P.S. Sometimes I think that balloon timeout in Windows XP wasn't implemented, because I made handler to NIN_BALLOONTIMEOUT and when I close the balloon this handler is called.