Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Shell_NotifyIcon tooltip bubble minimum timeout

286 views
Skip to first unread message

Joe Meilak

unread,
Oct 4, 2002, 9:26:24 PM10/4/02
to
I'm going to reply to myself, as I made a discovery today.
It seems that Windows XP does honor the balloon ToolTip minimum value, and
does queue balloon tip requests, IF a balloon for a *different* icon is up
when you try to display yours.

In other words, if your icon's balloon is up, then the shell just blasts it
immediately with the new balloon value. If some other icon's balloon is up,
then your balloon won't appear for several seconds, and subsequent balloon
tip requests are queued and displayed *slowly* one after the other.

Don't know why the shell behaves this way, but that is the way it seems to
work.

"Joe Meilak" <j0e_m...@yahoo.com> wrote in message
news:u5Wz0AXaCHA.1652@tkmsftngp09...
> Hi,
>
> The SDK documentation states the following for NOTIFYICONDATA:
>
> If you set the NIF_INFO flag in the uFlags member, the standard ToolTip is
> replaced by a balloon ToolTip. For more discussion of balloon ToolTips,
see
> the ToolTip Controls chapter.
> No more than one balloon ToolTip at a time is displayed for the taskbar.
If
> an application attempts to display a ToolTip when one is already being
> displayed, the ToolTip will not appear until the existing balloon ToolTip
> has been visible for at least the system minimum timeout value. For
example,
> a balloon ToolTip with uTimeout set to 30 seconds has been visible for
seven
> seconds when another application attempts to display a balloon ToolTip. If
> the system minimum timeout is ten seconds, the first ToolTip displays for
an
> additional three seconds before being replaced by the second ToolTip.
>
> ===
>
> My experience (on Windows XP Pro) has been different. If I rapidly
request
> several balloon tooltips for my tray icon, only the last one shows (the
> others are "overwritten"). Am I doing something wrong? My code (that
> changes the bubble text) is below.
>
> Thanks,
> Joe
>
> NOTIFYICONDATA tnid = { sizeof( tnid ) };
> tnid.hWnd = hwndMain;
> tnid.uID = N_TRAY_ICON_ID;
> tnid.uFlags = NIF_INFO; // Show information icon in bubble.
>
> // Ensure bubble text string is not too long. If so, truncate it!
> _tcsncpy( tnid.szInfo, pzBubbleText, STR_SIZE( tnid.szInfo ) );
>
> // Ensure bubble text title is not too long. If so, truncate it!
> _tcsncpy( tnid.szInfoTitle, pzBubbleTitle, STR_SIZE(
tnid.szInfoTitle ) );
>
> tnid.dwInfoFlags = nSysIcon; // Show system icon in bubble (info,
warning,
> error).
>
> tnid.uTimeout = 15000; // Show bubble text for 15 seconds.
>
> // Show the bubble message!
> BOOL bResult = ::Shell_NotifyIcon( NIM_MODIFY, &tnid );
>
>
>
>
>


Patrick

unread,
Oct 14, 2002, 12:19:44 PM10/14/02
to
Yes, that's what MSDN says:
...For example, a balloon ToolTip with uTimeout set to 30 seconds
has been visible for seven seconds when ANOTHER application
attempts to display a balloon ToolTip...
I guess they could be a bit more explicit on that point.

- Patrick

"Joe Meilak" <j0e_m...@yahoo.com> wrote in message news:<#Kiqf2AbCHA.2616@tkmsftngp09>...

0 new messages