UDF > GUI > GuiToolTip >


_GUIToolTip_Destroy

Supprime un contr�le info-bulle

#include <GuiToolTip.au3>
_GUIToolTip_Destroy ( ByRef $hWnd )

Param�tre

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

Valeur de retour

Succ�s: Retourne True, $hWnd est d�fini � 0.
�chec: Retourne False, et @error est d�fini �:
        1 - Non autoris� � d�truire un contr�le(s) d'une autre application
        2 - $hWnd n'est pas le handle d'un contr�le info-bulle

Remarque

Fonction r�serv�e uniquement aux contr�les ToolTip cr��s avec _GUIToolTip_Create.

En relation

_GUIToolTip_Create

Exemple

#include <GUIConstantsEx.au3>
#include <GUIToolTip.au3>
; Click the button to destroy the tooltip control
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 au contr�le info-bulle
    _GUIToolTip_AddTool($hToolTip, 0, "This is a ToolTip", $hButton)
    _GUIToolTip_AddTool($hToolTip, 0, "ToolTip text for the GUI", $hGUI)
    GUISetState(@SW_SHOW)

    Local $iMsg = GUIGetMsg()
    While $iMsg <> $GUI_EVENT_CLOSE
        if $iMsg = $idButton Then
            ; D�truit le contr�le info-bulle
            _GUIToolTip_Destroy($hToolTip)
        EndIf
        $iMsg = GUIGetMsg()
    WEnd

    ; D�truit le contr�le info-bulle (Dans le cas o� le bouton n'a pas encore �t� actionn�)
    _GUIToolTip_Destroy($hToolTip)
    GUIDelete($hGUI)
EndFunc   ;==>Example