Extrait des informations sur un �l�ment d�clencheur d'un contr�le info-bulle
#include <GuiToolTip.au3>
_GUIToolTip_EnumTools ( $hWnd, $iIndex )
$hWnd | Handle du contr�le info-bulle (retourn� par _GUIToolTip_Create.) |
$iIndex | Index, de base 0, de l'�l�ment d�clencheur pour lequel il faut r�cup�rer des informations |
_GUIToolTip_GetCurrentTool, _GUIToolTip_GetToolInfo
#include <GUIConstantsEx.au3> #include <GUIToolTip.au3> #include <MsgBoxConstants.au3> Example() Func Example() Local $hGUI = GUICreate(StringTrimRight(@ScriptName, StringLen(".exe")), 350, 200) Local $idButton = GUICtrlCreateButton("This is a button", 30, 32, 130, 28) Local $hButton = GUICtrlGetHandle($idButton) ; Cr�e un contr�le info-bulle avec les param�tres par d�faut Local $hToolTip = _GUIToolTip_Create(0) ; Ajoute un �l�ment d�clencheur au contr�le info-bulle _GUIToolTip_AddTool($hToolTip, 0, "This is a ToolTip", $hButton) _GUIToolTip_AddTool($hToolTip, 0, "This is the GUI ToolTip", $hGUI) GUISetState(@SW_SHOW) ; GetToolCount retourne 2, mais les �l�ments sont num�rot�s � partir de 0, donc nous avons soustrait 1 For $I = 0 To _GUIToolTip_GetToolCount($hToolTip) - 1 Local $aTool = _GUIToolTip_EnumTools($hToolTip, $I) MsgBox($MB_SYSTEMMODAL, "Tooltip info for tooltip - " & $I, "Flags: " & @TAB & _GUIToolTip_BitsToTTF($aTool[0]) & @CRLF & _ "HWnd: " & @TAB & $aTool[1] & @CRLF & _ "ID: " & @TAB & $aTool[2] & @CRLF & _ "Left X:" & @TAB & $aTool[3] & @CRLF & _ "Left Y:" & @TAB & $aTool[4] & @CRLF & _ "Right X:" & @TAB & $aTool[5] & @CRLF & _ "Right Y:" & @TAB & $aTool[6] & @CRLF & _ "Instance:" & @TAB & $aTool[7] & @CRLF & _ "Text:" & @TAB & $aTool[8] & @CRLF & _ "lParam:" & @TAB & $aTool[9]) Next ; D�truit le contr�le info-bulle _GUIToolTip_Destroy($hToolTip) GUIDelete($hGUI) EndFunc ;==>Example