Function Reference


Returns the height of the control

#include <GuiToolTip.au3>
_GUIToolTip_GetBubbleHeight ( $hWnd, $hTool, $iID [, $iFlags = 0x00000001 + 0x00000010] )


$hWnd Handle to the ToolTip control (returned by _GUIToolTip_Create.)
$hTool Handle to the window that contains the tool
$iID Handle of the control that the tool is associated with, or the ID of the tool
$iFlags [optional] Flags that control the ToolTip display:
    $TTF_IDISHWND = Indicates that $iID is the window handle to the tool instead of the ID
    $TTF_CENTERTIP = Centers the window below the tool specified by $iID
    $TTF_RTLREADING = Indicates that text will be displayed in the opposite direction
    $TTF_SUBCLASS = Indicates that the control should subclass the tool's window to intercept messages
    $TTF_TRACK = Positions the control next to the tool to which it corresponds
    $TTF_ABSOLUTE = Positions the window at the same coordinates provided by TTM_TRACKPOSITION
    $TTF_TRANSPARENT = Causes the control to forward mouse messages to the parent window
    $TTF_PARSELINKS = Indicates that links in the control text should be parsed

Return Value

Returns the height the ToolTip.


This function works correctly only on a tracking tooltip, if the tracking hasn't been activated for the tooltip you will get incorrect values returned.


_GUIToolTip_GetBubbleSize, _GUIToolTip_GetBubbleWidth


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


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

        Local $idButton = GUICtrlCreateButton("This is a button", 30, 32, 130, 28)
        Local $hButton = GUICtrlGetHandle($idButton)
        ; create a tooltip control using default settings
        Local $hToolTip = _GUIToolTip_Create(0)

        ; add a tool to the tooltip control
        _GUIToolTip_AddTool($hToolTip, 0, "This is a ToolTip", $hButton)
        _GUIToolTip_TrackActivate($hToolTip, True, 0, $hButton)
        ; Display the height of the tooltip bubble in pixels
        MsgBox($MB_SYSTEMMODAL, "Info", "Bubble Height = " & _GUIToolTip_GetBubbleHeight($hToolTip, 0, $hButton) & " Pixels")

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