Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Calendar
  New Posts New Posts RSS Feed - Tooltip doesn't hide with the calendar
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Tooltip doesn't hide with the calendar

 Post Reply Post Reply
Author
Message
JohnCrenshaw View Drop Down
Groupie
Groupie
Avatar

Joined: 08 September 2006
Status: Offline
Points: 65
Post Options Post Options   Thanks (0) Thanks(0)   Quote JohnCrenshaw Quote  Post ReplyReply Direct Link To This Post Topic: Tooltip doesn't hide with the calendar
    Posted: 12 April 2007 at 1:07pm

All you poor folks at CodeJock probably start crying when you see another post from me. The good news is that this is a piece of cake to fix, and I even posted the code for you.

If the calendar disappears, with a visible tooltip, the tooltip sticks around. This became an issue since our product can make the calendar hide without the user clicking, pressing a button, or anything else that would normally cause the tooltip to be dismissed.
 
The solution, if you didn't guess already, is to add a message handler for WM_SHOWWINDOW and hide the tooltip if the window hides.
 
In the header add:
   afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);
 
In the cpp file add this to the message map...
   ON_WM_SHOWWINDOW()
 
...and this with the other message handlers.
void CPopoutCalendar::OnShowWindow(BOOL bShow, UINT nStatus)
{
   // hide the tooltip when we hide the window
   if (!bShow)
      HideToolTip();
   // call the base class
   CXTPCalendarControl::OnShowWindow(bShow, nStatus);
}

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.