mfc >> Tooltips Don't Work

by Robert A. » Fri, 28 Jan 2005 22:43:21 GMT

Hi guys,

My application is based on the AppWizard Non-DocView model and everything
works great except the toolbar tooltips. How can I get them to work ? I just
created a new application using the Wizard and the tooltips work in that
one, but if I add a new toolbar button it *doesn't* have a functioning
tooltip (I thought I could learn how to do it that way).

So what should I do ? Do I have to create the tooltip structures and handle
the notification messages myself ?

Take care,
Robert A.




mfc >> Tooltips Don't Work

by Dave » Sat, 29 Jan 2005 00:01:06 GMT


no, you don't have to do it yourself... after you create the bar you need to
do something like:

m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() |
CBRS_TOOLTIPS | CBRS_FLYBY);

to turn on the tips.



just
handle





mfc >> Tooltips Don't Work

by Robert A. » Sat, 29 Jan 2005 00:21:47 GMT

Hi,

I already have those styles set when I create the toolbar. Where do I set
the text that appears in the tooltip ? The 'prompt' for the toolbar button
properties (in the resource editor) sets the text that appears in the status
bar but I can't figure out where to set the tooltips.

Thanks.

PS - I'm using VC++ 6.0 (SP5)




Tooltips Don't Work

by Johnny » Sat, 29 Jan 2005 03:04:52 GMT




same place. It wasn't obvious to me first time either...
you put \n as a seperator then the tooltip text e.g,
prompt text\ntooltip text




Tooltips Don't Work

by Robert A. » Sat, 29 Jan 2005 04:01:27 GMT

Thanks Johnny,

I just did what you said and they work great now.

Take care.




Similar Threads

1. Tooltips don't work for CEdit controls

Hi, I'm using VC++ in VStudio 2005.  Inside my dialog of CDialog base type, 
I'm dynamically (programmatically) creating several child edit controls of my 
own type (CSendchk) based on CEdit.  These edit controls look and function 
perfectly within the parent dialog.

I would like to display a tooltip when mouse hovers over any of those edit 
controls.  So, as the help reference guide suggests, I added a call to 
EnableToolTips(TRUE) inside my InitDialog() method and hook the notification 
with my override CSendchk:OnToolTipNotify().

As expected, I do receive the notification for my OK and Cancel buttons, so 
the tooltip notification system apparently works.  However, I receive none 
for any of my edit controls.

Anyone know why?

My edit control creation code is:

for ( int iCnt=0; i<10; iCnt++ )
{
   (control positioning code here)

   m_pedtCells[iCnt] = new CEditchk();

   m_pedtCells[iCnt]->Create(WS_CHILD|WS_TABSTOP|WS_VISIBLE,
   r, this, iCnt+1 );
}

Thanks for any help


maple


2. Tracking tooltips don't display at all

3. Tooltips don't appear in Crystal Report Control in VC6/7

Could someone kindly tell me how I can view tooltips created in
Crystal Reports 8.5 using a Crystal Report Control (NOT the Crystal
Report Viewer Control)  ActiveX Object in VC++.

Currently I am able to view the crystal reports using the Crystal
Report Control from a Dialog based VC++ application, but I have been
unsuccessful in making the tooltips appear (even though the tooltips
appear fine when opening the report using the crystal report
software)

Any help will be greatly appreciated.

Thanks in advance.

CD

4. Tooltips don't appear in Crystal Report Viewer Control in VC6/7

5. Listview tooltips not working properly

Hi Steve,

Thanks for posting in the community. 

From your description, I understand that the ToolTip cannot display your 
string into 2 lines while the string hasn't a space character within it.  
Please correct me if there is any misunderstand.

Based on my experience, I think it is a default behavior to the windows' 
ToolTip, it seems not have a way to separate a long word by himself.


Thanks!

Best regards,

Gary Chang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------

6. Tooltips dont work in modeless dialogs inside ActiveX

7. Tooltips stop working when adding ON_UPDATE_COMMAND_UI handler

After adding a ON_UPDATE_COMMAND_UI handler(this is the only one I have), 
tooltips for all toolbars stop working.  I'm using this handler to disable 
the button it handles under certain conditions.  Does anyone know why this 
occurs and a fix?  Possibly there is a better mechanism for disabling the 
button, if so, what?

Thanks,
Drew 


8. Tooltips working in MFC app, but not from DLL