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.
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).
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).