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

Problem with TTM_DELTOOL?

 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: 865
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdhd Quote  Post ReplyReply Direct Link To This Post Topic: Problem with TTM_DELTOOL?
    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?
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.188 seconds.