Funktionreferenz


_GUIToolTip_SetTipTextColor

Beschreibung anzeigen in

Setzt die Textfarbe

#include <GuiToolTip.au3>
_GUIToolTip_SetTipTextColor ( $hWnd, $iColor )

Parameter

$hWnd Handle des Controls (welches von _GUIToolTip_Create zurückgegeben wird.)
$iColor Neue Textfarbe (siehe Bemerkungen)

Rückgabewert

Keine.

Bemerkungen

Der Farbwert in der _GUIToolTip_SetTipTextColor() Funktion ist im COLORREF (BGR) Format 0x00bbggrr.
Das letzte Byte beinhaltet die Sättigung des Rotanteils, das mittlere Byte die Sättigung des Grünanteils und das erste und höchste Byte beinhaltet die Sättigung des Blauanteils.

- - - - - - - - Erklärung der Controls - - - - - - - -

Verwandte Funktionen

_GUIToolTip_GetTipTextColor

Beispiel

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

Example()

Func Example()
    Local $hGUI = GUICreate("ToolTip Get/Set Tip TextColor (v" & @AutoItVersion & ")", 350, 200)

    Local $idAdd = GUICtrlCreateButton("Button", 30, 32, 130, 28)
    Local $hAdd = GUICtrlGetHandle($idAdd)

    ; Create a tooltip control
    Local $hToolTip = _GUIToolTip_Create($hGUI, $TTS_BALLOON)
    _WinAPI_SetWindowTheme($hToolTip, "", "")

    ; Change the color settings for the tooltip
    ; The color value used in the _GUIToolTip_SetTipBkColor function is a COLORREF (BGR) value
    _GUIToolTip_SetTipBkColor($hToolTip, 0x395A00)
    ; The color value used in the _GUIToolTip_SetTipTextColor function is a COLORREF (BGR) value
    _GUIToolTip_SetTipTextColor($hToolTip, 0x1EBFFF)

    ; Add a tool to the tooltip control
    _GUIToolTip_AddTool($hToolTip, 0, "This is the ToolTip text", $hAdd)
    GUISetState(@SW_SHOW)

    ; Retrieve the text color of the tooltip.
    MsgBox($MB_SYSTEMMODAL, 'Message', 'Text color : 0x' & Hex(_GUIToolTip_GetTipTextColor($hToolTip), 6))

    While 1
        If GUIGetMsg() = $GUI_EVENT_CLOSE Then ExitLoop
    WEnd
    ; Destroy the tooltip control
    _GUIToolTip_Destroy($hToolTip)
    GUIDelete($hGUI)
EndFunc   ;==>Example