Function Reference


_GUIToolTip_GetTitleText

Retrieve the title

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

Parameters

$hWnd Handle to the ToolTip control (returned by _GUIToolTip_Create.)

Return Value

Returns the ToolTip title.

Related

_GUIToolTip_GetTitleBitMap, _GUIToolTip_SetTitle

Example

#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