tags:

views:

150

answers:

2

Hello,

My application (C++ WinAPI) creates an icon in the system tray. I have set a tooltip text for this icon, so that when a user places a mouse cursor over the icon, this text shows.

But I want to programmatically show different balloon notications when certan events occur and at the same time keep that behavior of showing the constant notification message when a user places a mouse over the icon.

How to achieve this in C++ WinAPI?

Thanks

Alexander Smirnov

+1  A: 

You can add the balloon using the .szInfo (message) and .szInfoTitle (title) members of the NOTIFYICONDATA structure that you send to Shell_NotifyIcon(). The mouse-over tooltip text is set in .szTip so this is independent of the balloon - as long as you keep .szTip to the tooltip you want you can do as much NIM_MODIFY calls to change the balloon while not changing anything to the tooltip.

Wim