Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Problem with CancelTooltips for HTML tips
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Problem with CancelTooltips for HTML tips

 Post Reply Post Reply
Author
Message
rdhd View Drop Down
Senior Member
Senior Member
Avatar

Joined: 13 August 2007
Location: United States
Status: Offline
Points: 886
Post Options Post Options   Thanks (1) Thanks(1)   Quote rdhd Quote  Post ReplyReply Direct Link To This Post Topic: Problem with CancelTooltips for HTML tips
    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.
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.125 seconds.