VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Adding multiline balloon tooltips to ListView column headers (updated)

by 10Tec Company (5 Submissions)
Category: Windows API Call/Explanation
Compatability: Visual Basic 5.0
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (10 Votes)

The code uses subclassing technique to trap the WM_MOUSEMOVE event of the Header control which is a constituent part of the ListView control. The handler for this event determines the index of the column header under the mouse pointer and changes the tooltip text respectively; it uses the HDM_HITTEST message for this purpose.
To find the handle of the Header control inside ListView from MSCOMCTL.OCX, the code uses the FindWindowEx function which searches for the child window with the "msvb_lib_header" class inside the ListView control.

Assumes
The code also can be used to subclass the "pure" ListView control (its class name is "SysListView32"); to do it, you must replace the "msvb_lib_header" string on "SysHeader32". The sample creates MS Windows tooltips with the CreateWindowEx function passing to this function the "tooltips_class32" class name. Balloon tooltips work only in Windows 2000/XP; in the previous versions of Windows you'll see old-style rectangular tooltips. You can use this technique to create multiline balloon tooltips for any control that contains Windows Header control. For instance, we use this technique to create such tooltips for the grid control we produce (10Tec iGrid ActiveX control - visit www.10Tec.com for more info).

Rate Adding multiline balloon tooltips to ListView column headers (updated)

Download Adding multiline balloon tooltips to ListView column headers (updated)

Download Adding multiline balloon tooltips to ListView column headers (updated) (6 KB)

Adding multiline balloon tooltips to ListView column headers (updated) Comments

No comments have been posted about Adding multiline balloon tooltips to ListView column headers (updated). Why not be the first to post a comment about Adding multiline balloon tooltips to ListView column headers (updated).

Post your comment

Subject:
Message:
0/1000 characters