Displaying tooltips

Displaying tooltips

Post by Ketil Hu » Tue, 04 Mar 1997 04:00:00



Is there a way to force tooltips to being displayed, even when the
mouse is not over the object?

Thanks,
____________________________________________________________________
 Ketil Hunn                        MSIS student at the
 6629 Wilkins Ave                  University of Pittsburgh.
 Pittsburgh, PA 15217

 Phone: 412 421 5735               http://www.lis.pitt.edu/~ketil/

 
 
 

Displaying tooltips

Post by Cecil A. Galbrait » Wed, 05 Mar 1997 04:00:00



> Is there a way to force tooltips to being displayed, even when the
> mouse is not over the object?

> Thanks,
> ____________________________________________________________________
>  Ketil Hunn                        MSIS student at the
>  6629 Wilkins Ave                  University of Pittsburgh.
>  Pittsburgh, PA 15217

>  Phone: 412 421 5735               http://www.lis.pitt.edu/~ketil/

Probably, but then they aren't tooltips anymore. What are you trying to
do, exactly?

Cecil

--
Cecil Galbraith

Free programmer's utilities and MFC tips at
http://www.concentric.net/~cgalbrai

 
 
 

Displaying tooltips

Post by Ketil Hu » Wed, 05 Mar 1997 04:00:00


On Tue, 04 Mar 1997 09:18:07 -0500 "Cecil A. Galbraith"


>Probably, but then they aren't tooltips anymore. What are you trying to
>do, exactly?

I've released a small e-mail notifier that displays an icon in the
system tray and notifies you on incoming messages (message on screen,
sound, running e-mail reader, etc). I would like to add one more
optional feature for users that do not want the message on screen and
that is to display the tooltype which says 'XX new messages' for a
couple of seconds after new messages have been found.

I've searched the include file for Shell_Notification(), but I saw
that only 3 defines were present (add, modify and delete). Is there a
simple solution?

Later,
____________________________________________________________________
 Ketil Hunn                        MSIS student at the
 6629 Wilkins Ave                  University of Pittsburgh.
 Pittsburgh, PA 15217

 Phone: 412 421 5735               http://www.lis.pitt.edu/~ketil/

 
 
 

Displaying tooltips

Post by Sam Blackbur » Thu, 06 Mar 1997 04:00:00


Take a look at the CBubble class in the freeware Win32 Foundation Classes
(WFC) library. It creates a tooltip window anywhere you want.

http://ourworld.compuserve.com/homepages/sam_blackburn/wfc.htm



> On Tue, 04 Mar 1997 09:18:07 -0500 "Cecil A. Galbraith"

> >Probably, but then they aren't tooltips anymore. What are you trying to
> >do, exactly?

> I've released a small e-mail notifier that displays an icon in the
> system tray and notifies you on incoming messages (message on screen,
> sound, running e-mail reader, etc). I would like to add one more
> optional feature for users that do not want the message on screen and
> that is to display the tooltype which says 'XX new messages' for a
> couple of seconds after new messages have been found.

> I've searched the include file for Shell_Notification(), but I saw
> that only 3 defines were present (add, modify and delete). Is there a
> simple solution?

 
 
 

Displaying tooltips

Post by Walter Bur » Sat, 08 Mar 1997 04:00:00


Ketil Hunn  wrote

Quote:> Is there a way to force tooltips to being displayed, even when the
> mouse is not over the object?

Just talking off the top of my head,
Supposing that you're using the built-in tooltips for you CWnd,
call EnableTooltTips in your client view's OnInitialUpdate, then
try overriding the virtual function
virtual int CWnd::OnToolHitTest( CPoint point, TOOLINFO* pTI ) const;

If you return a "1" it'll think a tooltip was found.  It's tricky to use
though.

Otherwise, if you're declaring your own CTooltip, give it a very short
timeout and forward it fake mouse locations with it's RelayEvent method,
say, (0,0 and 1,1) depending on whether you want it on or off,
and then respond to TTN_NEEDTEXT.

Wouldn't it be easier just to drop a little child Window with no border
overtop your client, and forget about officially calling it a tooltip?
-- walter