Function Reference


Adds a standard icon and title string

#include <GuiToolTip.au3>
_GUIToolTip_SetTitle ( $hWnd, $sTitle [, $iIcon = 0] )


$hWnd Handle to the ToolTip control (returned by _GUIToolTip_Create.)
$sTitle Title string
$iIcon [optional] Set to one of the values below:.
    $TTI_NONE (0) - No icon [default]
    $TTI_INFO (1) - Information icon
    $TTI_WARNING (2) - Warning icon
    $TTI_ERROR (3) - Error Icon
    $TTI_INFO_LARGE (4) - Large Information Icon
    $TTI_WARNING_LARGE (5) - Large Warning Icon
    $TTI_ERROR_LARGE (6) - Large Error Icon

Return Value

Success: True.
Failure: False.


As of Windows XP SP2 and later, $iIcon can contain an HICON value. Any value greater than 3 is assumed to be an HICON.
The title of a tooltip appears above the text, in a different font. It is not sufficient to have a title; the tooltip must have text as well, or it is not displayed.
A title with an Icon but no text in the title won't display a title or the icon. You have to set the text of the title, even if it's only one character, if you plan on using an icon.
The string entered in $sTitle must not exceed 99 characters in length.


_GUIToolTip_GetTitleText, _GUIToolTip_UpdateTipText


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


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

        Local $idAdd = GUICtrlCreateButton("Button", 30, 32, 130, 28)
        Local $hAdd = GUICtrlGetHandle($idAdd)

        ; 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", $hAdd)

        ; Set the title of the tooltip
        _GUIToolTip_SetTitle($hToolTip, 'This is the ToolTip title', $TTI_INFO)


        While 1
                If GUIGetMsg() = $GUI_EVENT_CLOSE Then ExitLoop
        ; Destroy the tooltip control
EndFunc   ;==>Example