Hat jemand noch eine Idee, wie man die Hintergrundfarbe eines GUI IP Address Control Feldes ändern kann?
[autoit]
#include <GuiConstantsEx.au3>
#include <GuiIPAddress.au3>
#include <WindowsConstants.au3>
Opt("MustDeclareVars", 1)
[/autoit][autoit][/autoit][autoit]$Debug_IP = False ; Check ClassName being passed to IPAddress functions, set to True and use a handle to another control to see it work
[/autoit][autoit][/autoit][autoit]_Main()
[/autoit][autoit][/autoit][autoit]Func _Main()
Local $hgui, $hIPAddress
$hgui = GUICreate("IP Address Control Get (String) Example", 400, 300)
$hIPAddress = _GUICtrlIpAddress_Create($hgui, 10, 10, 125, 25, BitOR($WS_TABSTOP,$WS_VISIBLE,$WS_CLIPSIBLINGS))
GUISetState(@SW_SHOW)
[/autoit][autoit][/autoit][autoit]Local $tRECT = DllStructCreate($tagRect)
DllStructSetData($tRECT, "Left", 0)
DllStructSetData($tRECT, "Top", 0)
DllStructSetData($tRECT, "Right", 125)
DllStructSetData($tRECT, "Bottom", 25)
Local $hBrush = _WinAPI_CreateSolidBrush(0x0000FF) ;BGR
Local $hDC = _WinAPI_GetDC($hIPAddress)
_WinAPI_FillRect($hDC, DllStructGetPtr($tRect), $hBrush)
;~ _GUICtrlIpAddress_Set ($hIPAddress, "24.168.2.128")
_WinAPI_SetTextColor($hDC, 0x00)
_WinAPI_SetBkColor($hDC, 0x0000FF)
_WinAPI_SetBkMode($hDC, $TRANSPARENT)
; Wait for user to close GUI
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
$tRECT = ""
_WinAPI_ReleaseDC(0, $hDC)
_WinAPI_DeleteObject($hBrush)
GUIDelete($hgui)
Exit
EndFunc ;==>_Main
Sobald man was einträgt, überschreibt der Font den Hintergrund wieder...
Oder vielleicht doch einen anderen Lösungsweg?
Gruß,
UEZ