Function Reference


_GUIToolTip_GetTitleBitMap

Retrieves the title bitmap icon

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

Parameters

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

Return Value

Returns the reference number of the ToolTip title icon. See remarks

Remarks

The icon reference number returned by this function is related to the icons used to set the title icon, see _GUIToolTip_SetTitle().
If using the standard icons, the return values will be
        $TTI_NONE = 0
        $TTI_INFO or $TTI_INFO_LARGE = 1
        $TTI_WARNING or $TTI_WARNING_LARGE = 2
        $TTI_ERROR or $TTI_ERROR_LARGE = 3
Any icon used that isn't one of these will return 4 signifying an HICON was used.

Related

_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 Bitmap", _GUIToolTip_GetTitleBitMap($hToolTip))
        EndSwitch
    WEnd
    ; Destroy the tooltip control
    _GUIToolTip_Destroy($hToolTip)
    GUIDelete($hGUI)
EndFunc   ;==>Example