David Citron
David Citron

Reputation: 43619

Win32 ToolTip disappears never to re-appear with Commctl 6

I'm creating a ToolTip window and adding tools to it using the flags TTF_IDISHWND | TTF_SUBCLASS. (c++, win32)

I have a manifest file such that my program uses the new WindowsXP themes (comctrl32 version 6).

When I hover over a registered tool, the tip appears.
Good.
When I click the mouse, the tip disappears.
Ok.
However, moving away from the tool and back again does not make the tip re-appear. I need to hover over a different tool and then come back to my tool to get the tip to come back.

When I remove my manifest file (to use the older non-XP comctrl32), the problem goes away.

After doing some experimentation, I discovered the following differences between ToolTips in Comctl32 version 5 (old) and Comctl32 version 6 (new):

Thus, as a comctl32 workaround, I had to:

I assume that the change in internal behavior was to accommodate the new "clickable" features in ToolTips like hyperlinks, but the hover behavior appears to be thus broken.

Does anyone know of a better solution than my subclass workaround? Am I missing some other point?

Upvotes: 8

Views: 2068

Answers (2)

Aardvark
Aardvark

Reputation: 8561

You're not the only one who has hit compatablity issues with tooltips between these DLLS.

I too have had nothing but trouble with the new tooltips in the themable common controls. We have already been monkeying with mouse messages and active/deactivating the tips before adding the manifest and theming our application - so it sounds like what your doing isn't too crazy.

We're still living with problems with TTN_NEEDTEXT messages being send constantly as the mouse moves (not just when hovering), positioning problems with large tips (maybe not something new), and odd unicode messages being sent instead of the ANSI versions (which I plan to post as a question at some point).

Upvotes: 1

1800 INFORMATION
1800 INFORMATION

Reputation: 135285

I don't know, but this sounds like a really "hard" problem (in the sense that all real-world) problems are really hard. I bet the underlying problem is something to do with the setting of the focus. Windows that manually do that are evil and generally suffer from all manner of bugs.

Upvotes: 0

Related Questions