FIX: CToolTipCtrl Stops Working After Dialog Is Displayed (143313)
The information in this article applies to:
- The Microsoft Foundation Classes (MFC), when used with:
- Microsoft Visual C++, 32-bit Editions 4.0
- Microsoft Visual C++, 32-bit Editions 4.1
- Microsoft Visual C++, 32-bit Enterprise Edition 4.2
- Microsoft Visual C++, 32-bit Enterprise Edition 5.0
- Microsoft Visual C++, 32-bit Enterprise Edition 6.0
- Microsoft Visual C++, 32-bit Professional Edition 4.2
- Microsoft Visual C++, 32-bit Professional Edition 5.0
- Microsoft Visual C++, 32-bit Professional Edition 6.0
- Microsoft Visual C++, 32-bit Learning Edition 6.0
This article was previously published under Q143313 SYMPTOMS
If you create a CToolTipCtrl and call AddTool() to activate it, it will
work until you display a modal dialog box. For example, if on the Help
menu, you click About to display the About box, and you then click OK to
dismiss it, the CToolTipCtrl will not pop up anymore.
CAUSE
MFC is sending a WM_DISABLEMODAL to all of the frame's descendant windows
when a modal dialog box pops up. The CToolTipCtrl responds to the
WM_DISABLEMODAL by sending itself a TTM_ACTIVATE with a FALSE. This
disables it. However, the CToolTipCtrl doesn't reactivate itself once the
frame calls EnableWindow() for its descendants.
RESOLUTION
You should have a PreTranslateMessage() function where you are calling
RelayEvent(). The workaround for this problem is to call Activate(TRUE)
before the call to RelayEvent().
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article.
This problem was corrected in Microsoft Visual C++ .NET.
Modification Type: | Major | Last Reviewed: | 12/9/2003 |
---|
Keywords: | kbBug kbfix kbNoUpdate kbToolTip KbUIDesign KB143313 |
---|
|