Sets the information for a tool
#include <GuiToolTip.au3>
_GUIToolTip_SetToolInfo ( $hTool, $hWnd, $iID [, $sText = "" [, $iFlags = Default [, $iLeft = 0 [, $iTop = 0 [, $iRight = 0 [, $iBottom = 0 [, $hInst = 0 [, $iParam = 0]]]]]]]] )
| $hTool | Handle of the window that contains the tool, or 0 |
| $hWnd | Handle to the window that contains the tool |
| $iID | Identifier of the tool, or Window handle of the control the tool is assigned to |
| $sText | [optional] Text for the ToolTip control |
| $iFlags | [optional] Flags that control the ToolTip display: $TTF_IDISHWND - Indicates that $iID is a window or control handle, instead of the ID of the tool [default] $TTF_CENTERTIP - Centers the tooltip below the control specified by $iID $TTF_RTLREADING - Indicates that text will be displayed in the opposite direction (right to left) $TTF_SUBCLASS - Indicates that the control should subclass the tool's window [default] $TTF_TRACK - Positions the tooltip window next to the tool to which it corresponds $TTF_ABSOLUTE - Positions the window at the same coordinates provided by TTM_TRACKPOSITION. (see Remarks) $TTF_TRANSPARENT- Causes the control to forward mouse messages to the parent window $TTF_PARSELINKS - Indicates that links in the control text should be displayed as links Default = BitOr($TTF_SUBCLASS, $TTF_IDISHWND) |
| $iLeft | [optional] X coordinate of the upper left corner of the rectangle |
| $iTop | [optional] Y coordinate of the upper left corner of the rectangle |
| $iRight | [optional] X coordinate of the lower right corner of the rectangle |
| $iBottom | [optional] Y coordinate of the lower right corner of the rectangle |
| $hInst | [optional] Handle to the instance that is associated with the tool |
| $iParam | [optional] Application-defined value that is associated with the tool |
If $hWnd referenced control is not in the same process and both processes run in different AutoIt mode (@AutoItVersion), the @error is set to 6.
Some internal properties of a tool are established when the tool is created, and are not recomputed when a $TTM_SETTOOLINFO message is sent.
If you simply assign values to a TOOLINFO structure and pass it to the ToolTip control with a $TTM_SETTOOLINFO message, these properties may be lost.
Instead your application should first request the tool's current TOOLINFO structure by sending a $TTM_GETTOOLINFO message.
Then, modify the members of this structure as needed and pass it back to the ToolTip control with $TTM_SETTOOLINFO.
When calling $TTM_SETTOOLINFO, the string pointed to by the Text member of the TOOLINFO structure must not exceed 80 characters in length.