Question

i have a program which displays tray icon and popups and balloon when some event occurs. The problem arises when i change the image of the try icon no balloon popups when the event occurs what could i be missing?

Abdul khaliq

Was it helpful?

Solution

Maybe when you're changing the icon, its ICONDATA gets modified in a way that the system won't show the balloon or modify the notification icon anymore. It could be even incorrectly set cbSize struct member.

Check if Shell_NotifyIcon returns TRUE when trying to pop up. If FALSE, also check the dwMessage member, whether it's set to e.g. NIM_SETVERSION. That could mean that the ICONDATA structure's version given is unsupported, like the documentation says.

Also in case of a failure check the actual error with the GetLastError function.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top