#include <tchar.h>
#include <windows.h>
int _tmain(int argc, _TCHAR* argv[])
{
NOTIFYICONDATA nid = {0};
nid.cbSize = sizeof(NOTIFYICONDATA);
nid.hWnd = GetDesktopWindow();
nid.uID = 1001;
nid.uFlags = NIF_ICON | NIF_INFO;
nid.hIcon = LoadIcon(NULL, IDI_INFORMATION);
nid.hBalloonIcon = LoadIcon(NULL, IDI_INFORMATION);
nid.dwInfoFlags = NIIF_INFO;
_tcscpy(nid.szInfoTitle, _T("Title1"));
_tcscpy(nid.szInfo, _T("Info1"));
Shell_NotifyIcon(NIM_ADD, &nid);
Sleep(2000);
nid.dwInfoFlags = NIIF_WARNING;
_tcscpy(nid.szInfoTitle, _T("Title2"));
_tcscpy(nid.szInfo, _T("Info2"));
Shell_NotifyIcon(NIM_MODIFY, &nid);
Sleep(2000);
Shell_NotifyIcon(NIM_DELETE, &nid);
return 0;
}