Abdul Khaliq
Abdul Khaliq

Reputation: 2463

Tray Icon issue

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

Upvotes: 1

Views: 481

Answers (1)

macbirdie
macbirdie

Reputation: 16193

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.

Upvotes: 1

Related Questions