Function Reference


_GUIToolTip_AdjustRect

Calculates the text display rectangle from the window rectangle

#include <GuiToolTip.au3>
_GUIToolTip_AdjustRect ( $hWnd, ByRef $tRECT [, $bLarger = True] )

Parameters

$hWnd Handle to the ToolTip control (returned by _GUIToolTip_Create.)
$tRECT $tagRECT structure that holds a window or text display rectangle
$bLarger [optional] Value that specifies which operation to perform. If True, $tRECT is used to specify a text display rectangle and it receives the corresponding window rectangle. If False, $tRECT is used to specify a window rectangle and it receives the corresponding text display rectangle.

Return Value

Returns a $tagRECT structure.

Remarks

The ToolTip's window rectangle is somewhat larger than the text display rectangle that bounds the ToolTip string.
The window origin is also offset up and to the left from the origin of the text display rectangle.
To position the text display rectangle, you must calculate the corresponding window rectangle and use that rectangle to position the ToolTip.
_GUIToolTip_AdjustRect() handles this calculation for you.
If you set $bLarger to True, _GUIToolTip_AdjustRect() takes the size and position of the desired ToolTip text display rectangle, and passes back the size and position of the ToolTip window needed to display the text in the specified position.
If you set $bLarger to False you can specify a ToolTip window rectangle and _GUIToolTip_AdjustRect() will return the size and position of its text rectangle.