Funktionreferenz


_GUIToolTip_GetTitleText

Beschreibung anzeigen in

Ermittelt den Titel

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

Parameter

$hWnd Handle des Controls (welches von _GUIToolTip_Create zurückgegeben wird.)

Rückgabewert

Gibt den Titel des ToolTips zurück

Bemerkungen

- - - - - - - - Erklärung der Controls - - - - - - - -

Verwandte Funktionen

_GUIToolTip_GetTitleBitMap, _GUIToolTip_SetTitle

Beispiel

#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)

    ; Create a tooltip control
    Local $hToolTip = _GUIToolTip_Create($hGUI)

    ; Add a tool to the tooltip control
    _GUIToolTip_AddTool($hToolTip, 0, "This is the ToolTip text", $hButton)

    Local $hIcon = _WinAPI_LoadShell32Icon(15)

    ; Set the title of the tooltip
    _GUIToolTip_SetTitle($hToolTip, 'This is the Title Text', $hIcon)

    GUISetState(@SW_SHOW)

    While 1
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE
                ExitLoop
            Case $idButton
                MsgBox($MB_SYSTEMMODAL, "Title Text", _GUIToolTip_GetTitleText($hToolTip))
        EndSwitch
    WEnd
    ; Destroy the tooltip control
    _GUIToolTip_Destroy($hToolTip)
    GUIDelete($hGUI)
EndFunc   ;==>Example