Print Page | Close Window

Tooltip doesn't hide with the calendar

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Calendar
Forum Description: Topics Related to Codejock Calendar
URL: http://forum.codejock.com/forum_posts.asp?TID=6850
Printed Date: 10 May 2024 at 4:45am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Tooltip doesn't hide with the calendar
Posted By: JohnCrenshaw
Subject: Tooltip doesn't hide with the calendar
Date 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);
}




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net