UDF > GUI > GuiToolTip >


_GUIToolTip_ToolExists

Détermine si un élément déclencheur est en cours d'affichage

#include <GuiToolTip.au3>
_GUIToolTip_ToolExists ( $hWnd )

Paramètre

$hWnd Handle du contrôle info-bulle (retourné par _GUIToolTip_Create.)

Valeur de retour

True: L'élément existe.
False: L'élément n'existe pas.

Remarque

Cette fonction ne retournera true que si le contrôle info-bulle est en train d'afficher l'un des éléments qui lui sont associés.

Exemple

#include <GUIConstantsEx.au3>
#include <GUIToolTip.au3>
#include <MsgBoxConstants.au3>

Global $g_hToolTip

; Appuyez sur la touche "g" pour afficher les informations
HotKeySet("g", "Get_Tool")

Example()

Func Example()
    Local $hGUI = GUICreate(StringTrimRight(@ScriptName, 4), 350, 200)

    Local $idButton = GUICtrlCreateButton("Button ToolTip", 30, 32, 130, 28)
    Local $hButton = GUICtrlGetHandle($idButton)
    ; Crée un contrôle info-bulle en utilisant les paramètres par défaut
    $g_hToolTip = _GUIToolTip_Create(0)

    ; Ajoute un élément au contrôle info-bulle
    _GUIToolTip_AddTool($g_hToolTip, 0, "This is a ToolTip", $hButton)
    GUISetState(@SW_SHOW)
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE

    ; Détruit le contrôle info-bulle
    _GUIToolTip_Destroy($g_hToolTip)
    GUIDelete($hGUI)
EndFunc   ;==>Example

Func Get_Tool()
    ; Cela permet d'afficher "True" si l'élément est en cours d'affichage
    MsgBox($MB_SYSTEMMODAL, "", "Tooltip Exists = " & _GUIToolTip_ToolExists($g_hToolTip))
EndFunc   ;==>Get_Tool