Tooltips appear behind the form which is hosting the control

Summary

Id: 13463.2
Type: Bug Bug
Current Status: Resolved

Detail

15 Nov 2003 Open Steve McMahon

When an item is too long to display in the current view, the TreeView correctly pops up a tooltip to show the missing item text. However, this currently pops up behind the form which hosts the control, which isn’t particularly useful.

6 Dec 2003 Resolution Identified Paul Wilde

I had exactly the same problem with a superclassed treeview control I wrote a while back. I got around the problem by explicitly bringing the tip window to the top of the z-order whenever it was shown; I do this everytime I get a TVN_GETINFOTIP msg, but I expect it would work fine if you just did it as part of the control initialisation if you're not using TVS_INFOTIP.

// get tooltip control
HWND hWndTooltip = (HWND)SendMessage(TVM_GETTOOLTIPS);
if (hWndTooltip)
{
   // make sure it is topmost
   ::SetWindowPos(hWndTooltip, HWND_TOPMOST, 
       0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE); 
}

Paul Wilde

Innovasys

http://www.innovasys.net

8 Jan 2004 Resolution Identified James Ferguson

A fix has been documented for this by Microsoft. See KB241102.

Best Regards,

James Ferguson

15 Feb 2004 Resolved Steve McMahon

Fixed.