stevejobs
asked on
Tooltips in CView disabled after showing dialog
My tooltips in a CView window works fine if I don't invoke any (modal) dialog. If I display a dialog, then the tooltips don't show any more until another new CView is displayed. There was a similar known bug in MFC tooltip handling. How do I fix this problem? I tried EnableToolTips in CView again to no effect. [To emphasize: I am referring to the tooltips in the CView controls, not on the toolbar.]
How do you do your tooltips in the view class? Do you use EnableToolTips() ?
Do you mean that tooltips work. The you display a (modal) dialog and CLOSE it, and the tooltips no longer work after that?
Or are you saying that they do not work WHILE the modal dialog is displayed?
What version of MC do you have? Do you havethe latest service packs (SP3?)
Or are you saying that they do not work WHILE the modal dialog is displayed?
What version of MC do you have? Do you havethe latest service packs (SP3?)
ASKER
Yes, I use EnableTooltips() when creating the CView window.
Yes, the tooltips work so long as I don't open any dialog. Once a dialog is opened (any dialog) and then closed and I go back to the CView window, tooltips don't appear again.
No, I am not saying they don't work while the dialog is displayed. I believe the dialog code somehow disable tooltips and I tried to reenable in CView but it didn't help.
I have Visual Studio C++ 5.0 and latest SP 3.
Yes, the tooltips work so long as I don't open any dialog. Once a dialog is opened (any dialog) and then closed and I go back to the CView window, tooltips don't appear again.
No, I am not saying they don't work while the dialog is displayed. I believe the dialog code somehow disable tooltips and I tried to reenable in CView but it didn't help.
I have Visual Studio C++ 5.0 and latest SP 3.
What happens if you click on the view (to ensure it is the active window)?
It could be that after your dialog closes, your view is not active (perhaps the frame is active instead).
It could be that after your dialog closes, your view is not active (perhaps the frame is active instead).
ASKER
I sure do click on the view. In fact, if I create a new view (this is an MDI app), the new view window will have tooltips active while the old one doesn't.
hmmm .. let me dwell on that for a while.
ASKER
I've just rechecked and can confirm that the 'activeness' of a view window doesn't affect the tooltips display. A view window can be inactive and still have tooltips. It seems the dialog (in my case) disables the tooltips of its parent and I just want to be able to reactivate the tooltip function in the view parent!!!
I know it's just one line of code, but where?
I know it's just one line of code, but where?
Actually, I remember reading something about a similar problem (of tooltips not being reactiveated). It is a bug in the code .. I'll try to track it down for you.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Are you doing anything with tooltips in the modal dialog? Maybe that is having a similar effect?
ASKER
RONSLOW:
You are marvellous. I suspected it was only one line of code and I tried the EnableToolTips while I should use the Activate(TRUE) statement.
Thank you!!! Bug is fixed.
You are marvellous. I suspected it was only one line of code and I tried the EnableToolTips while I should use the Activate(TRUE) statement.
Thank you!!! Bug is fixed.
>You are marvellous
Glad to have my opinion of myself backed up :-)
And glad to help you.
Glad to have my opinion of myself backed up :-)
And glad to help you.