Problem with CancelTooltips for HTML tips |
Post Reply |
Author | |
rdhd
Senior Member Joined: 13 August 2007 Location: United States Status: Offline Points: 886 |
Post Options
Thanks(1)
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. |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |