Print Page | Close Window

Problem with TTM_DELTOOL?

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=23365
Printed Date: 28 November 2024 at 1:11am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Problem with TTM_DELTOOL?
Posted By: rdhd
Subject: Problem with TTM_DELTOOL?
Date Posted: 16 June 2017 at 9:19am
I was examining CXTPToolTipContext to see if I could find a clue to an issue we see every once in a while on some machines where the tooltip image I get for an HTML tooltip appears to be coming from the another control - usually the control next to, or near, the one the tip is being displayed for.

When SetVisibleTool is called I call Navigate. PumpMessage is called in a loop after calling Navigate until the ready state of the browser control is raised. Then I use the uId to get an image, which I save to disk and then use as the source in the html.

So I examined FilterToolTipMessageHelper for clues. I noticed SendMessage(TTM_DELTOOL, (LPARAM)&m_lastInfo) is sent to the tooltip. I looked at OnDelTool and I see that if the uId in the tool matches m_nToolTipBeingShownUid, the CXTPToolTipContextToolTip calls PostMessage(TTM_DELTOOL ...). So the SendMessage from the context is essentially turned into a PostMessage by the tooltip itself.

Then the SendMessage returns to the context and in the tip context I see this:

m_lastInfo = tiHit;

So isn't it possible that while still waiting for the ready state and pumping messages that the posted TTM_DELTOOL message will processed later than the context expects with the possibility that the uId no longer matches the original id the context intended to be used when SendMessage was called?



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