UDF > GUI > GuiToolTip >


_GUIToolTip_GetTitleText

Obtient le titre du contrôle info-bulle

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

Paramètre

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

Valeur de retour

Retourne le titre d'info-bulle.

En relation

_GUIToolTip_GetTitleBitMap, _GUIToolTip_SetTitle

Exemple

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

Example()

Func Example()
    Local $hGUI = GUICreate(StringTrimRight(@ScriptName, StringLen(".exe")), 350, 200)

    Local $idButton = GUICtrlCreateButton("Button", 30, 32, 130, 28)
    Local $hButton = GUICtrlGetHandle($idButton)

    ; Crée un contrôle info-bulle
    Local $hToolTip = _GUIToolTip_Create($hGUI)

    ; Ajoute un élément au contrôle info-bulle
    _GUIToolTip_AddTool($hToolTip, 0, "This is the ToolTip text", $hButton)

    Local $hIcon = _WinAPI_LoadShell32Icon(15)

    ; Définit le titre de l'info-bulle
    _GUIToolTip_SetTitle($hToolTip, 'This is the Title Text', $hIcon)

    GUISetState(@SW_SHOW)

    Local $iMsg = GUIGetMsg()
    While $iMsg <> $GUI_EVENT_CLOSE
        if $iMsg = $idButton Then
            MsgBox($MB_SYSTEMMODAL, "Title Text", _GUIToolTip_GetTitleText($hToolTip))
        EndIf
        $iMsg = GUIGetMsg()
    WEnd

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