marsfann

How to change tooitip font size?

10 posts in this topic

#1 ·  Posted (edited)

Hi

I have check tooltip function

but, I can not find the way to change font size

How to change tooitip font size?

Edited by marsfann

Share this post


Link to post
Share on other sites



The tooltip font size is system dependent. You'd have to change it through the desktop properties.

You could try creating your own tooltip with adjustable font properties or perhaps a TrayTip?

Share this post


Link to post
Share on other sites

It seems to work with _WinAPI_CreateFont and _SendMessage :

 

#include <GUIConstantsEx.au3>
#include <GUIToolTip.au3>
#include <FontConstants.au3>
#include <SendMessage.au3>
#include <WindowsConstants.au3>

Local $hGUI = GUICreate("GUI", 300, 200)
Local $IDButton = GUICtrlCreateButton("Button", 10, 10, 200, 30)
Local $hToolTip = _GUIToolTip_Create(0, $TTS_BALLOON)

_GUIToolTip_AddTool($hToolTip, 0, "Tooltip with the specified font", GUICtrlGetHandle($IDButton) )

GUISetState(@SW_SHOW)

Local $hDC = _WinAPI_GetDC(0)
Local $hFont = _WinAPI_CreateFont(50, 0, 0, 0, 800, False, False, False, $DEFAULT_CHARSET, _
        $OUT_DEFAULT_PRECIS, $CLIP_DEFAULT_PRECIS, $DEFAULT_QUALITY, 0, 'Verdana')
$hOldFont = _WinAPI_SelectObject($hDC, $hFont)
_SendMessage ($hToolTip, $WM_SETFONT, $hFont, TRUE)

Do 
Until GUIGetMsg() = $GUI_EVENT_CLOSE

_WinAPI_SelectObject($hDC, $hOldFont)
_GUIToolTip_Destroy($hToolTip)
_WinAPI_DeleteObject($hFont)
_WinAPI_ReleaseDC(0, $hDC)
_WinAPI_InvalidateRect(0, 0)

 

Share this post


Link to post
Share on other sites

The tooltip font size is system dependent. You'd have to change it through the desktop properties.

You could try creating your own tooltip with adjustable font properties or perhaps a TrayTip?

if i use "GUICreate" ,when i play the game that is fullscreen

gmae will be minimize or crash

so, I have to use tooltip

Share this post


Link to post
Share on other sites

Look at the GUIToolTip_TrackPosition example script, you don't even need the GUI in that one. Combine the correct tracking functions for the tooltip with jguinch's code to get what you're looking for.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

Since the good search tools went away last year, I've never been able to get decent results with Search ... so I resort to google.  But this time, it came up short.

So I'll just ask:  What's the current prescribed search method?

site_search.thumb.png.e7936a01da83856117

Share this post


Link to post
Share on other sites

Help file


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

Look at the GUIToolTip_TrackPosition example script, you don't even need the GUI in that one. Combine the correct tracking functions for the tooltip with jguinch's code to get what you're looking for.

Use "GUIToolTip_TrackPosition",tooltip will trace my mouse

 

 

#include <GuiToolTip.au3>
#include <WinAPI.au3>
#include <GUIConstantsEx.au3>
#include <FontConstants.au3>
#include <SendMessage.au3>
#include <WindowsConstants.au3>

Local $hToolTip = _GUIToolTip_Create(0), $hDC = _WinAPI_GetDC(0)
Local $hFont = _WinAPI_CreateFont(32, 0, 0, 0, 800, False, False, False, $DEFAULT_CHARSET,$OUT_DEFAULT_PRECIS, $CLIP_DEFAULT_PRECIS, $DEFAULT_QUALITY, 0, 'Tahoma')
Local $hOldFont = _WinAPI_SelectObject($hDC, $hFont)
_SendMessage ($hToolTip, $WM_SETFONT, $hFont, TRUE)
_GUIToolTip_AddTool($hToolTip, 0, "55555555555555555")
_GUIToolTip_TrackPosition($hToolTip,0 ,0)
_GUIToolTip_TrackActivate($hToolTip, True, 0, 0)
Sleep(1500)
_GUIToolTip_UpdateTipText($hToolTip, 0, 0, "999999999999")
Sleep(3000)
_GUIToolTip_Destroy($hToolTip)

Share this post


Link to post
Share on other sites

Use "GUIToolTip_TrackPosition",tooltip will trace my mouse

It only follows your mouse because the flags for the AddTool function weren't set.

Try this script out and you'll see it won't follow your mouse.

#include <GuiToolTip.au3>
#include <WinAPI.au3>
#include <GUIConstantsEx.au3>
#include <FontConstants.au3>
#include <SendMessage.au3>
#include <WindowsConstants.au3>

Local $hToolTip = _GUIToolTip_Create(0), $hDC = _WinAPI_GetDC(0)
Local $hFont = _WinAPI_CreateFont(32, 0, 0, 0, 800, False, False, False, $DEFAULT_CHARSET, $OUT_DEFAULT_PRECIS, $CLIP_DEFAULT_PRECIS, $DEFAULT_QUALITY, 0, 'Tahoma')
Local $hOldFont = _WinAPI_SelectObject($hDC, $hFont)
_SendMessage($hToolTip, $WM_SETFONT, $hFont, True)
_GUIToolTip_AddTool($hToolTip, 0, "55555555555555555", 0, 0, 0, 0, 0, BitOR($TTF_TRACK, $TTF_ABSOLUTE)) ; <<<<<<<<<<<<<<<
_GUIToolTip_TrackPosition($hToolTip, 0, 0)
_GUIToolTip_TrackActivate($hToolTip, True, 0, 0)
Sleep(1500)
_GUIToolTip_UpdateTipText($hToolTip, 0, 0, "999999999999")
_GUIToolTip_TrackPosition($hToolTip, 100, 100)
Sleep(3000)
_GUIToolTip_Destroy($hToolTip)

 


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

It only follows your mouse because the flags for the AddTool function weren't set.

Try this script out and you'll see it won't follow your mouse.

#include <GuiToolTip.au3>
#include <WinAPI.au3>
#include <GUIConstantsEx.au3>
#include <FontConstants.au3>
#include <SendMessage.au3>
#include <WindowsConstants.au3>

Local $hToolTip = _GUIToolTip_Create(0), $hDC = _WinAPI_GetDC(0)
Local $hFont = _WinAPI_CreateFont(32, 0, 0, 0, 800, False, False, False, $DEFAULT_CHARSET, $OUT_DEFAULT_PRECIS, $CLIP_DEFAULT_PRECIS, $DEFAULT_QUALITY, 0, 'Tahoma')
Local $hOldFont = _WinAPI_SelectObject($hDC, $hFont)
_SendMessage($hToolTip, $WM_SETFONT, $hFont, True)
_GUIToolTip_AddTool($hToolTip, 0, "55555555555555555", 0, 0, 0, 0, 0, BitOR($TTF_TRACK, $TTF_ABSOLUTE)) ; <<<<<<<<<<<<<<<
_GUIToolTip_TrackPosition($hToolTip, 0, 0)
_GUIToolTip_TrackActivate($hToolTip, True, 0, 0)
Sleep(1500)
_GUIToolTip_UpdateTipText($hToolTip, 0, 0, "999999999999")
_GUIToolTip_TrackPosition($hToolTip, 100, 100)
Sleep(3000)
_GUIToolTip_Destroy($hToolTip)

 

BrewManNH!!!!

thank you so much

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Similar Content

    • astrionn
      By astrionn
      So I had this Idea of creating a tooltip which shows me my ping.
      That itself was made quickly and I thought too add a couple features.
      I want the tooltip background to be a different color depending on the ping. (good ping is green, medium ping is yellow,...)
      So how do I color in a tooltip? google brought me to this: 
       
      where in the comments I found this:
      $s = "LOW" ToolTip($s, 0, 0, "Battery Information");, $icon) $H_TOOLTIP1 = WinGetHandle($s) DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", $H_TOOLTIP1, "wstr", "", "wstr", "") DllCall("user32.dll", "int", "SendMessage", "hwnd", $H_TOOLTIP1, "int", 1043, "int", 2552550, "int", 0) Sleep(1000) Which I then used in my code with different color codes... Trial and Error brought me these that I wanted to use:
       
      The Problem is if I loop through my code it only sets the color for the 1st loop and then sticks to it.
      The real problem is tho that I don't exactly understand the dllcalls... And I guess that's why it isn't working
      So if someone would be so awesome to explain to me how they work, or at least can give me a list of these parameters then I would really appreciate that and learn something new
      Obviously a solution to my problem is awesome aswell ^^
      I run this under Windows 8.1
      There is my code in a paste.
      https://pastebin.com/q525f7mS
    • Trolleule
      By Trolleule
      Hi,
      i want to display a tooltip when i hover over the listview group. It sounds not difficult but i couldn't find a solution and i searched for autoit as well as for c# :/
      So i came up with a not so pretty solution:
      #include <GUIConstantsEx.au3> #include <GuiImageList.au3> #include <GuiListView.au3> #include <WindowsConstants.au3> #include <MsgBoxConstants.au3> #include <GuiToolTip.au3> #include <WinAPI.au3> Global $idListview, $hWndListView Global $hToolTip = _GUIToolTip_Create(0, BitOR($_TT_ghTTDefaultStyle, $TTS_BALLOON)); balloon style tooltip Global Const $LVN_GROUPINFO = ($LVN_FIRST - 88) Global Const $tagNMLVGROUP = $tagNMHDR & ";int iGroupId;uint iNewState;uint iOldState" ; $LVGS_flags $LVGS_flags Func WM_NOTIFY($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg, $wParam Local $tInfo, $tNMHDR = DllStructCreate($tagNMHDR, $lParam), $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom")) Local $iIDFrom = DllStructGetData($tNMHDR, "IDFrom"), $iCode = DllStructGetData($tNMHDR, "Code") Switch $hWndFrom Case $hWndListView Switch $iCode ; Case $of?????? ; A Group was clicked <---- I need help with this Case $LVN_GROUPINFO ConsoleWrite("hier" & @CRLF) $tInfo = DllStructCreate($tagNMLVGROUP, $lParam) _DebugPrint("$LVN_GROUPINFO" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode & @CRLF & _ "-->GroupId:" & @TAB & DllStructGetData($tInfo, "iGroupId") & @CRLF & _ "-->NewState:" & @TAB & DllStructGetData($tInfo, "iNewState") & @CRLF & _ "-->OldState:" & @TAB & DllStructGetData($tInfo, "iOldState")) Case $LVN_COLUMNCLICK ; A column was clicked $tInfo = DllStructCreate($tagNMLISTVIEW, $lParam) _DebugPrint("$LVN_COLUMNCLICK" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode & @CRLF & _ "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @CRLF & _ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @CRLF & _ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @CRLF & _ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @CRLF & _ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @CRLF & _ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @CRLF & _ "-->Param:" & @TAB & DllStructGetData($tInfo, "Param")) ; No return value Case $NM_CLICK ; Sent by a list-view control when the user clicks an item with the left mouse button $tInfo = DllStructCreate($tagNMITEMACTIVATE, $lParam) _DebugPrint("$NM_CLICK" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _ "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _ "-->Code:" & @TAB & $iCode & @CRLF & _ "-->Index:" & @TAB & DllStructGetData($tInfo, "Index") & @CRLF & _ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @CRLF & _ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @CRLF & _ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @CRLF & _ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @CRLF & _ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @CRLF & _ "-->lParam:" & @TAB & DllStructGetData($tInfo, "lParam") & @CRLF & _ "-->KeyFlags:" & @TAB & DllStructGetData($tInfo, "KeyFlags")) ; No return value EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_NOTIFY Func _DebugPrint($s_Text, $sLine = @ScriptLineNumber) ConsoleWrite( _ "!===========================================================" & @CRLF & _ "+======================================================" & @CRLF & _ "-->Line(" & StringFormat("%04d", $sLine) & "):" & @TAB & $s_Text & @CRLF & _ "+======================================================" & @CRLF) EndFunc ;==>_DebugPrint If Not StringInStr($CmdLineRaw, "/ErrorStdOut") Then Exit MsgBox($MB_TOPMOST, @ScriptName, 'please run from the editor, thanks', 10) Example() Func Example() Local $aInfo, $hImage, $idListview $ghui = GUICreate("ListView Group COLLAPSIBLE", 400, 300) $idListview = GUICtrlCreateListView("", 30, 20, 354, 218);, BitOR($LVS_SHOWSELALWAYS, $LVS_SINGLESEL, $LVS_REPORT, $WS_CLIPSIBLINGS)) $hWndListView = GUICtrlGetHandle($idListview) ; Load images $hImage = _GUIImageList_Create() _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($idListview, 0xFF0000, 16, 16)) _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($idListview, 0x00FF00, 16, 16)) _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($idListview, 0x0000FF, 16, 16)) _GUICtrlListView_SetImageList($idListview, $hImage, 1) ; Add columns _GUICtrlListView_AddColumn($idListview, "Column 1", 100) _GUICtrlListView_AddColumn($idListview, "Column 2", 100) _GUICtrlListView_AddColumn($idListview, "Column 3", 100) ; Add items _GUICtrlListView_AddItem($idListview, "Row 1: Col 1", 0) _GUICtrlListView_AddSubItem($idListview, 0, "Row 1: Col 2", 1) _GUICtrlListView_AddSubItem($idListview, 0, "Row 1: Col 3", 2) _GUICtrlListView_AddItem($idListview, "Row 2: Col 1", 1) _GUICtrlListView_AddSubItem($idListview, 1, "Row 2: Col 2", 1) _GUICtrlListView_AddItem($idListview, "Row 3: Col 1", 2) ; Build groups _GUICtrlListView_EnableGroupView($idListview) _GUICtrlListView_InsertGroup($idListview, -1, 1, "Group 1", 1) ;~ _GUICtrlListView_SetGroupInfo($idListview, 1, "Group 1", 0, $LVGS_COLLAPSIBLE + $LVGS_COLLAPSED) ; <--- _GUICtrlListView_InsertGroup($idListview, -1, 2, "Group 2") ;~ _GUICtrlListView_SetGroupInfo($idListview, 2, "Group 2", 0, $LVGS_COLLAPSIBLE + $LVGS_COLLAPSED) ; <--- _GUICtrlListView_SetItemGroupID($idListview, 0, 1) _GUICtrlListView_SetItemGroupID($idListview, 1, 2) _GUICtrlListView_SetItemGroupID($idListview, 2, 2) GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") Local $apos = _GUICtrlListView_GetGroupRect($idListview, 2, $LVGGR_LABEL) Local $test = GUICtrlCreateLabel("a", 2, 2, 10, 17) Local $val = _WinAPI_GetWindowLong(GUICtrlGetHandle($test), $GWL_STYLE) Local $valex = _WinAPI_GetWindowLong(GUICtrlGetHandle($test), $GWL_EXSTYLE) Local $aha = _WinAPI_CreateWindowEx($valex+$WS_EX_LAYERED, "static", "blabla", $val, $apos[0], $apos[1], 50, 20, $hWndListView) _GUIToolTip_AddTool($hToolTip, $hWndListView, "This is a ToolTip3", $aha) GUISetState(@SW_SHOW) ; Loop until the user exits. Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc ;==>Example Short description: I only created a label with CreateWindowEx which i can append to the listview control and layered it with the $WS_EX_Layered flag so it looks like it's transparent. Then i only added a tooltip tool to that created label.
      Hover over the Group 2 text and the Tooltip will be displayed. My question is: does someone know another perhaps much prettier solution?
      Thanks in advance
    • Sucre
      By Sucre
      I turned to Autoit from AHK just because it support WinForm Application so well. The problem often haunts me that all the application in my job is WinForm. And it indeed help my work so much. Great thanks in advance.
      However, I can't get the ToolTip text in the application of my company. Specifically,now I want to get the information about some data, however the information is all displayed in the tooltip on the scatter diagram which is made of those data.
      Is there any advice ? Relative topics I have searched can't get any information about the winform tooltip...
       
    • Trolleule
      By Trolleule
      Hey,
      i can't find a solution, to set the direction of a tool tip.
      Bootstrap demo
      see "Bottom Tooltip", thats what i try to get. Can someone help?
      #include <GUIConstantsEx.au3> #include <GUIToolTip.au3> #include <GuiTab.au3> $hGUI = GUICreate("Built-In Tab Example", 500, 500) $hTab = GUICtrlCreateTab(10, 10, 480, 480) ; Create tabitems For $i = 0 To 2 GUICtrlCreateTabItem("Tab " & $i) $aha = GUICtrlCreateButton("Button " & $i, 20 + ($i * 100), 40 + ($i * 50), 80, 30) Next ; Close Tab definiton GUICtrlCreateTabItem("") ; #TOOL TIPS# ========================================================================================================================================================================= Global $hToolTip = _GUIToolTip_Create(GUICtrlGetHandle($hTab), BitOR($_TT_ghTTDefaultStyle, $TTS_BALLOON)); ) ; default style tooltip _GUICtrlTab_SetToolTips($hTab, $hToolTip) _GUIToolTip_SetMaxTipWidth($hToolTip, 100) ; this allows multiline tooltips _GUIToolTip_AddTool($hToolTip, 0, "Reset current View.", GUICtrlGetHandle($aha)) ; ===================================================================================================================================================================================== GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd  
    • buymeapc
      By buymeapc
      Hey all,
      Hopefully an easy question...if I have a listview with tooltips enabled and I move the mouse cursor off the listview, how can I clear the tooltip? In the reproducer below, the tooltip remains in almost every circumstance - even if I minimize the gui, the tooltip still overlays other windows. I'd like it to be cleared if I'm outside of the listview, ideally.
      Thanks.
      #include <GUIConstantsEx.au3> #include <GUIListView.au3> #include <WindowsConstants.au3> $hGUI = GUICreate("ToolTip test", 250, 200) $idListView = GUICtrlCreateListView("Column 0|Column 1|Column 2", 10, 10, 235, 175, $WS_VISIBLE, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_INFOTIP)) For $i = 0 To 5 GUICtrlCreateListViewItem(StringFormat("Item %s|abc%s|def%s", $i, $i, $i), $idListView) Next GUISetState(@SW_SHOW, $hGUI) GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd Func WM_NOTIFY($hWnd, $IMsg, $iwParam, $ilParam) #forceref $hWnd, $IMsg, $iwParam Local $hwndFrom, $iIDFrom, $iCode, $tNMHDR, $hWndListView, $tInfo, $gText, $aPos $hWndListView = $idListView If Not IsHWnd($hWndListView) Then $hWndListView = GUICtrlGetHandle($hWndListView) $tNMHDR = DllStructCreate($tagNMHDR, $ilParam) $hwndFrom = HWnd(DllStructGetData($tNMHDR, "hwndFrom")) $iIDFrom = DllStructGetData($tNMHDR, "idFrom") $iCode = DllStructGetData($tNMHDR, "Code") Switch $hwndFrom Case $hWndListView Switch $iCode Case $LVN_HOTTRACK; Sent by a list-view control When the user moves the mouse over an item $tInfo = DllStructCreate($tagNMLISTVIEW, $ilParam) $iItem = DllStructGetData($tInfo, "Item") $iSubItem = DllStructGetData($tInfo, "SubItem") If Not ($iItem = -1 Or $iSubItem = -1) Then $sText = _GUICtrlListView_GetItemText($hwndFrom, $iItem, $iSubItem) ToolTip($sText) Else ToolTip("") EndIf Return 1; the item will not be selected. EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc