Article ID: 143313
Article Last Modified on 11/21/2006
APPLIES TO
- Microsoft Foundation Class Library 4.2, when used with:
- Microsoft Visual C++ 4.0 Standard Edition
- Microsoft Visual C++ 4.1 Subscription
- Microsoft Visual C++ 4.2 Enterprise Edition
- Microsoft Visual C++ 5.0 Enterprise Edition
- Microsoft Visual C++ 6.0 Enterprise Edition
- Microsoft Visual C++ 4.2 Professional Edition
- Microsoft Visual C++ 5.0 Professional Edition
- Microsoft Visual C++ 6.0 Professional Edition
- Microsoft Visual C++ 6.0 Standard Edition
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.
Additional query words: kbVC400bug kbvc410bug kbvc420bug kbvc500bug kbvc600bug CToolTipCtrl DoModal
Keywords: kbbug kbfix kbnoupdate kbtooltip kbuidesign KB143313