Guten Tag,
weil das Thema so viel Interesse weckt, gibt es auch noch ein ausbaufähiges, spielerisches Beispiel von mir:
Spoiler anzeigen
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
GUICreate('"Marquee" Progress (RTL)', 300, 110)
$idPgr = GUICtrlCreateProgress(20, 20, 260, 25)
_RemoveTheme(-1)
GUICtrlSetBkColor(-1, 0)
$idBtn = GUICtrlCreateButton("Und Tschüss!", 20, 65, 260, 25)
AdlibRegister("_AnimateProgress", 10)
GUISetState()
While True
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
ExitLoop
Case $idBtn
ExitLoop
EndSwitch
WEnd
Exit
Func _AnimateProgress()
Static $I = 0
Static $D = 1
Static $C = 0X00FF00 - (0x200 * 101)
Static $RTL = False
Select
Case $I > 100
If $RTL Then
GUICtrlSetStyle($idPgr, -1, 0)
$RTL = False
Else
GUICtrlSetStyle($idPgr, -1, $WS_EX_LAYOUTRTL)
$RTL = True
EndIf
$D *= -1
Case $I < 0
$D *= -1
EndSelect
$I += $D
GUICtrlSetColor($idPgr, $C + (0x200 * $I))
GUICtrlSetData($idPgr, $I)
EndFunc
Func _RemoveTheme($hCtrl)
If Not IsHWnd($hCtrl) Then $hCtrl = GUICtrlGetHandle($hCtrl)
If IsHWnd($hCtrl) Then
Local $aR = DllCall("UxTheme.dll", "Long", "SetWindowTheme", "HWND", $hCtrl, "Ptr", 0, "WStr", " ")
If Not @error And $aR[0] = 0 Then Return True
EndIf
Return False
EndFunc
(Getestet unter Vista)