Obtient la couleur de fond
#include <GuiToolTip.au3>
_GUIToolTip_GetTipBkColor ( $hWnd )
$hWnd | Handle du contrôle info-bulle (retourné par _GUIToolTip_Create.) |
_GUIToolTip_GetTipTextColor, _GUIToolTip_SetTipBkColor, _GUIToolTip_SetTipTextColor
#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, $TTS_BALLOON) _WinAPI_SetWindowTheme($hToolTip, "", "") ; Change les paramètres de couleur de l'infobulle, ce sont des valeurs COLORREF (BGR). _GUIToolTip_SetTipBkColor($hToolTip, 0x395A00) _GUIToolTip_SetTipTextColor($hToolTip, 0x1EBFFF) ; Ajoute un élément au contrôle info-bulle _GUIToolTip_AddTool($hToolTip, 0, "This is the ToolTip text", $hButton) GUISetState(@SW_SHOW) ; Obtient la couleur du fond de l'info-bulle MsgBox($MB_SYSTEMMODAL, 'Message', 'Background color : 0x' & Hex(_GUIToolTip_GetTipBkColor($hToolTip), 6)) Do Until GUIGetMsg() = $GUI_EVENT_CLOSE ; Détruit le contrôle info-bulle _GUIToolTip_Destroy($hToolTip) GUIDelete($hGUI) EndFunc ;==>Example