Hello all, this time I meet a problem on ballon tips. I can use Shell_NotifyIcon() to add/remove a trayicon and it works well:
// Create TrayIcon
nid.cbSize=sizeof(NOTIFYICONDATA);
nid.uID=ID_MY_ICON;
nid.uFlags=NIF_ICON|NIF_MESSAGE|NIF_TIP|NIF_INFO;
nid.hIcon=(HICON)LoadImage(hInstance,MAKEINTRESOURCE(ID_MY_ICON),IMAGE_ICON,GetSystemMetrics(SM_CXSMICON),GetSystemMetrics(SM_CYSMICON),LR_DEFAULTCOLOR);
nid.hWnd=hwnd;
nid.uCallbackMessage=WM_TRAYMESSAGE;
strcpy(nid.szTip,tip_info);
Shell_NotifyIcon(NIM_ADD,&nid);
However, I want to show a balloon tip on it (not the icon tip controlled by nid.szTip), but I always can't see the balloon. Here is the code:
// Show balloon tips
strcpy(nid.szInfoTitle,"My Balloon Tips...");
//nid.uTimeout=10000; // Use the default system settings: 10~30 secs.
nid.dwInfoFlags=NIIF_INFO;
Shell_NotifyIcon(NIM_MODIFY,&nid);
The program is under Win7. And I checked the SDK documents, but not found. All found examples from internet are like my codes. Anybody knows the answer? Thanks!