Robert May wrote:

The example attached shows a couple of ways of setting the tools for a tooltip control and a couple of ways of setting the text. I haven't the time to look at a tracking example right now but here's the basic principle: (1) Add the tool to the tooltip control with the TTF_TRACK and TTF_ABSOLUTE options (-track => 1, -absolute => 1). You won't need to -subclass => 1 option due to (2) and (3) below. (2) Your application become responsible for when to display and hide the tooltip, using the TrackActivate() method. (3) Your application becomes responsible for setting the tooltip position with the TrackPosition() method (probably in a mouse move handler)

You can read all about tooltips and their related tools on msdn at:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/tooltip/reflist.asp

In the example provided, and all my further tests, using the subclass option provides inaccurate location for the automated placement. Try moving the window down a ways. You will find you need to expand the window.

It looks like the subclass option is using screen x,y vs where it should be using window x,y. More likely the conversion was not realized somewhere in the code, as I doubt anyone did this intentionally.

And I hate to be a pain, but I can't get my head around how to use the TrackActivate and TrackPosition methods appropriately.


Reply via email to