Ah, das war das richtige Stichwort! Danke!
Nach ein wenig rumprobieren kam das hier raus:
Screenshot:
Beispielscript:
[autoit]
#include<WinAPI.au3>
#include<WindowsConstants.au3>
GUICreate('test', 200, 80)
GUISetBkColor(0x000000)
GUICtrlCreateInput('beispieltext', 10, 10, 180, 20)
GUICtrlSetBkColor(-1, 0xffaa66) ; die Farben hier in RGB-Form
Global $aElements[2] = [$COLOR_HIGHLIGHTTEXT, $COLOR_HIGHLIGHT]
Global $aColors[2] = [0xffffff, 0xff0000], $aSaveColors[2] ; die Farben hier in BGR-Form angeben!
$aSaveColors[0] = _WinAPI_GetSysColor($COLOR_HIGHLIGHTTEXT)
$aSaveColors[1] = _WinAPI_GetSysColor($COLOR_HIGHLIGHT)
_WinAPI_SetSysColors($aElements, $aColors)
GUISetState()
Do
Until GUIGetMsg() = -3
_WinAPI_SetSysColors($aElements, $aSaveColors)
So sieht das doch gleich viel besser aus. BugFix, vielen Dank! ![]()
Edit: Achso, noch ein Hinweis (falls das noch jemand gebrauchen kann): die Farben sind nicht im RGB-Format, sondern müssen in BGR-Form angegeben werden.