Obtient, dans une structure, les marges gauche, sup�rieure, droite, et inf�rieure d'un contr�le info-bulle
#include <GuiToolTip.au3>
_GUIToolTip_GetMarginEx ( $hWnd )
$hWnd | Handle du contr�le info-bulle (retourn� par _GUIToolTip_Create.) |
_GUIToolTip_GetMargin, _GUIToolTip_ToolToArray
#include <GUIConstantsEx.au3> #include <GUIToolTip.au3> #include <MsgBoxConstants.au3> #include <WinAPITheme.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) ; Cr�e un contr�le info-bulle Local $hToolTip = _GUIToolTip_Create($hGUI, BitOR($_TT_ghTTDefaultStyle, $TTS_BALLOON)) ; Si vous utilisez un param�tre de th�me Windows, cela d�sactive cette option pour l'info-bulle affich�e, ; de sorte que vous pouvez modifier les param�tres de marge. Si vous ne le faites pas, les marges n'apparaitront pas diff�rentes _WinAPI_SetWindowTheme($hToolTip, "", "") ; Ajoute un �l�ment au contr�le info-bulle _GUIToolTip_AddTool($hToolTip, 0, "This is the ToolTip text", $hButton) ; D�finissez manuellement les marges de l'info-bulle au lieu d'utiliser les param�tres par d�faut. _GUIToolTip_SetMargin($hToolTip, 30, 10, 20, 12) ; Obtient les param�tres de marge de l'info-bulle Local $tRECT = _GUIToolTip_GetMarginEx($hToolTip) GUISetState(@SW_SHOW) MsgBox($MB_SYSTEMMODAL, 'Message', _ 'Left :' & @TAB & DllStructGetData($tRECT, "Left") & @LF & _ 'Top :' & @TAB & DllStructGetData($tRECT, "Top") & @LF & _ 'Right :' & @TAB & DllStructGetData($tRECT, "Right") & @LF & _ 'Bottom :' & @TAB & DllStructGetData($tRECT, "Bottom")) Do Until GUIGetMsg() = $GUI_EVENT_CLOSE ; D�truit le contr�le info-bulle _GUIToolTip_Destroy($hToolTip) GUIDelete($hGUI) EndFunc ;==>Example