Print Page | Close Window

Problem with CancelTooltips for HTML tips

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=23372
Printed Date: 24 November 2024 at 10:13pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Problem with CancelTooltips for HTML tips
Posted By: rdhd
Subject: Problem with CancelTooltips for HTML tips
Date Posted: 26 June 2017 at 11:28am
I have another issue when using HTML tooltips where sometimes the tooltip gets displayed after the user has moved on and the tip has been canceled. This one is related to the fact that HTML tooltips have to call PumpMessage. The message pumping occurs before the HTML tooltip's window is displayed. The window display happens after the ready state is signaled.

The problem is that the CodeJock CancelTooltips method calls SendMessage( TTM_ACTIVATE, FALSE ). SendMessage causes the CXTPToolTipContextToolTip::Activate method to be called immediately. At the end of the method, this code executes:

if (!bActivate && GetSafeHwnd() && IsWindowVisible())
{
    SetVisibleTool(NULL);
}

But since the window is not yet visible, the display isn't stopped. Eventually the read state is raised and the tooltip window is displayed. The user has to move back over the control and off of it to get the window to go away.

I have added code at the end of SetVisibleTool to check m_bActivate and if it has changed while in the method, I call SetVisibleTool(NULL) to clean up the tip.



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