Holy cow, I wrote a book!
The Shell_NotifyIcon function is used to do various
things, among them, displaying a balloon tip to the user.
As discussed in the documentation for
the NOTIFYICONDATA structure,
the uTimeout member specifies how long the balloon should be displayed.
But what if the user is not at the computer when you display your balloon?
After 30 seconds, the balloon will time out, and the user will have missed
your important message!
Never fear. The taskbar keeps track of whether the user is using the
(with the help of
the GetLastInputInfo function)
and doesn't "run the clock" if it appears that the user isn't there.
You will get your 30 seconds of "face time" with the user.
But what if you want to time out your message even if the user isn't there?
You actually have the information available to you to solve this puzzle
on the web pages I linked above. See if you can put the pieces together
and come up with a better solution than
simulating a click on the balloon.
(Hint: Look carefully at what it means if you set your balloon text to
an empty string.)
And what if you want your message to stay on the screen longer
than 30 seconds?
You can't. The notification area enforces a 30 second limit for
any single balloon. Because if they user hasn't done anything about it
for 30 seconds, they probably aren't interested.
If your message is so critical that the user shouldn't be allowed to ignore
it, then don't use a notification balloon.
Notification balloons are for non-critical transient messages to the user.