Example:

Simple Marquee Progress or continue for those interested in API calling ...
WARNING: The code below is old, outdated and poorly scripted, therefore caution should be used when viewing this code!
Spoiler
Traditional Example:
Function:
Example use of Function:
Example use of Function with inc. theming:
Traditional Example:
_Main() Func _Main() GUICreate("Standard use of a ProgressBar()", 240, 50, -1, -1) Local $Progress = GUICtrlCreateProgress(10, 10, 220, 20) GUISetState(@SW_SHOW) For $A = 1 To 100 GUICtrlSetData($Progress, $A) Sleep(50) If GUIGetMsg() = -3 Then ExitLoop Next While 1 Switch GUIGetMsg() Case -3 Exit EndSwitch WEnd EndFunc ;==>_Main
Function:
AutoIt
; #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 ; #FUNCTION# ========================================================================================================= ; Name...........: _ProgressSetMarquee ; Description ...: Starts/Stops the $PBS_MARQUEE effect on a GUICtrlCreateProgress() control. ; Syntax.........: _ProgressSetMarquee($iControl, $hHandle) ; Parameters ....: $iControl - A valid ProgressBar control ID. ; $hHandle - A valid GUI handle the ProgressBar is linked with. ; Requirement(s).: v3.3.0.0 or higher ; Return values .: Success - Returns a 2D Array with control ID and state of the ProgressBar. 0 = No Marquee effect Or 1 = Marquee effect. ; Author ........: guinness. ; Example........; Yes ;===================================================================================================================== Func _ProgressSetMarquee($iControl, $hHandle) Local $bType = 0, $iColor = -1, $iIndex = -1 If Not IsDeclared("Global_ProgressSetMarquee") Then Global $Global_ProgressSetMarquee[1][3] = [[0, 3]] For $A = 1 To $Global_ProgressSetMarquee[0][0] If @error Then ExitLoop If $Global_ProgressSetMarquee[$A][0] = $iControl Then $iIndex = $A $bType = $Global_ProgressSetMarquee[$iIndex][1] ExitLoop EndIf Next If $iIndex = -1 Then If $Global_ProgressSetMarquee[0][0] <= UBound($Global_ProgressSetMarquee, 1) + 1 Then ReDim $Global_ProgressSetMarquee[($Global_ProgressSetMarquee[0][0] + 1) * 2][$Global_ProgressSetMarquee[0][1]] $Global_ProgressSetMarquee[0][0] += 1 $iIndex = $Global_ProgressSetMarquee[0][0] $Global_ProgressSetMarquee[$iIndex][0] = $iControl $Global_ProgressSetMarquee[$iIndex][1] = $bType $Global_ProgressSetMarquee[$iIndex][2] = $iColor EndIf Local $hControl = GUICtrlGetHandle($Global_ProgressSetMarquee[$iIndex][0]), $aControlGetPos = ControlGetPos($hHandle, "", $Global_ProgressSetMarquee[$iIndex][0]) Local $aStyle = DllCall("user32.dll", "long", "GetWindowLong", "hwnd", $hControl, "int", 0xFFFFFFF0) Local $aExStyle = DllCall("user32.dll", "long", "GetWindowLong", "hwnd", $hControl, "int", 0xFFFFFFEC) If $aStyle[0] <> 1342308360 Then GUICtrlDelete($Global_ProgressSetMarquee[$iIndex][0]) $iControl = GUICtrlCreateProgress($aControlGetPos[0], $aControlGetPos[1], $aControlGetPos[2], $aControlGetPos[3], 0x0008, $aExStyle[0]) ; 0x0008 $hControl = GUICtrlGetHandle($iControl) If $Global_ProgressSetMarquee[$iIndex][2] <> -1 Then DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", $hControl, "wstr", 0, "wstr", 0) GUICtrlSetColor($iControl, $Global_ProgressSetMarquee[$iIndex][2]) EndIf $Global_ProgressSetMarquee[$iIndex][0] = $iControl EndIf Switch $Global_ProgressSetMarquee[$iIndex][1] Case 1 $bType = False Case Else $bType = True EndSwitch DllCall("user32.dll", "lresult", "SendMessageW", "hwnd", $hControl, "uint", 1034, "wparam", $bType, "lparam", 50) If @error Then $Global_ProgressSetMarquee[$iIndex][1] = 1 If $Global_ProgressSetMarquee[$iIndex][1] = 1 Then GUICtrlDelete($Global_ProgressSetMarquee[$iIndex][0]) $iControl = GUICtrlCreateProgress($aControlGetPos[0], $aControlGetPos[1], $aControlGetPos[2], $aControlGetPos[3], 0x0008, $aExStyle[0]) ; 0x0008 If $Global_ProgressSetMarquee[$iIndex][2] <> -1 Then DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($iControl), "wstr", 0, "wstr", 0) GUICtrlSetColor($iControl, $Global_ProgressSetMarquee[$iIndex][2]) EndIf $Global_ProgressSetMarquee[$iIndex][0] = $iControl $Global_ProgressSetMarquee[$iIndex][1] = 0 Return 0 EndIf $Global_ProgressSetMarquee[$iIndex][1] = 1 Return 1 EndFunc ;==>_ProgressSetMarquee ; #FUNCTION# ========================================================================================================= ; Name...........: _ProgressSetTheme ; Description ...: Sets a 'themed' ProgressBar with the ability to change the color of the ProgressBar. ; Syntax.........: _ProgressSetTheme([$iControl, [$bThemeColor]]) ; Parameters ....: $iControl - [optional] A valid ProgressBar control ID. Default = -1 (last control ID) ; $hHandle - [optional] A valid Hex color value. Default = 0x24D245 ; Requirement(s).: v3.3.0.0 or higher ; Return values .: Success - Returns a value from the 'SetWindowTheme' DLL call. ; Failure - Returns 0 with @extended set as 1. ; Author ........: guinness. ; Example........; Yes ;===================================================================================================================== Func _ProgressSetTheme($iControl = -1, $bThemeColor = 0x24D245) Local $bType = 0, $iColor = $bThemeColor, $iIndex = -1, $hControl = GUICtrlGetHandle($iControl) If Not IsDeclared("Global_ProgressSetMarquee") Then Global $Global_ProgressSetMarquee[1][3] = [[0, 3]] $iControl = DllCall("user32.dll", "int", "GetDlgCtrlID", "hwnd", $hControl) If @error Then Return SetError(1, 1, 0) $iControl = $iControl[0] For $A = 1 To $Global_ProgressSetMarquee[0][0] If @error Then ExitLoop If $Global_ProgressSetMarquee[$A][0] = $iControl Then If $Global_ProgressSetMarquee[$A][1] = 1 Then Return SetError(1, 1, 0) ; Marquee is already running. $iIndex = $A $bType = $Global_ProgressSetMarquee[$iIndex][1] ExitLoop EndIf Next If $iIndex = -1 Then If $Global_ProgressSetMarquee[0][0] <= UBound($Global_ProgressSetMarquee, 1) + 1 Then ReDim $Global_ProgressSetMarquee[($Global_ProgressSetMarquee[0][0] + 1) * 2][$Global_ProgressSetMarquee[0][1]] $Global_ProgressSetMarquee[0][0] += 1 $iIndex = $Global_ProgressSetMarquee[0][0] $Global_ProgressSetMarquee[$iIndex][0] = $iControl $Global_ProgressSetMarquee[$iIndex][1] = $bType $Global_ProgressSetMarquee[$iIndex][2] = $iColor EndIf Local $aReturn = DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", $hControl, "wstr", 0, "wstr", 0) If @error Then Return SetError(1, 1, 0) GUICtrlSetColor($iControl, $Global_ProgressSetMarquee[$iIndex][2]) Return $aReturn[0] EndFunc ;==>_ProgressSetTheme
Example use of Function:
AutoIt
#include <GUIConstantsEx.au3> _Main() Func _Main() Local $GUI, $Progress_1, $Progress_2, $Button_1, $Button_2, $Button_3, $Return, $Read $GUI = GUICreate("_ProgressSetMarquee()", 240, 90, -1, -1) $Progress_1 = GUICtrlCreateProgress(10, 10, 220, 20, 0x0008) ; 0x0008 = $PBS_MARQUEE From <ProgressConstants.au3> $Progress_2 = GUICtrlCreateProgress(10, 35, 220, 20, 0x0008) ; 0x0008 = $PBS_MARQUEE From <ProgressConstants.au3> $Button_1 = GUICtrlCreateButton("&Top", 10, 60, 70, 25) $Button_2 = GUICtrlCreateButton("&Bottom", 85, 60, 70, 25) $Button_3 = GUICtrlCreateButton("&All", 160, 60, 70, 25) GUISetState(@SW_SHOW) While 1 Switch GUIGetMsg() Case -3 Exit Case $Button_1 For $A = $Button_1 To $Button_3 If $A = $Button_1 Then ContinueLoop GUICtrlSetState($A, $GUI_DISABLE) Next $Return = _ProgressSetMarquee($Progress_1, $GUI) If $Return Then $Read = GUICtrlRead($Button_1) GUICtrlSetData($Button_1, "&Stop") Else GUICtrlSetData($Button_1, $Read) For $A = $Button_2 To $Button_3 GUICtrlSetState($A, $GUI_ENABLE) Next EndIf Case $Button_2 For $A = $Button_1 To $Button_3 If $A = $Button_2 Then ContinueLoop GUICtrlSetState($A, $GUI_DISABLE) Next $Return = _ProgressSetMarquee($Progress_2, $GUI) If $Return Then $Read = GUICtrlRead($Button_2) GUICtrlSetData($Button_2, "&Stop") Else GUICtrlSetData($Button_2, $Read) For $A = $Button_1 To $Button_3 If $A = $Button_2 Then ContinueLoop GUICtrlSetState($A, $GUI_ENABLE) Next EndIf Case $Button_3 For $A = $Button_1 To $Button_3 If $A = $Button_3 Then ContinueLoop GUICtrlSetState($A, $GUI_DISABLE) Next For $A = $Progress_1 To $Progress_2 $Return = _ProgressSetMarquee($A, $GUI) Next If $Return Then $Read = GUICtrlRead($Button_3) GUICtrlSetData($Button_3, "&Stop") Else GUICtrlSetData($Button_3, $Read) For $A = $Button_1 To $Button_3 If $A = $Button_3 Then ContinueLoop GUICtrlSetState($A, $GUI_ENABLE) Next EndIf EndSwitch WEnd EndFunc ;==>_Main ; #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 ; #FUNCTION# ========================================================================================================= ; Name...........: _ProgressSetMarquee ; Description ...: Starts/Stops the $PBS_MARQUEE effect on a GUICtrlCreateProgress() control. ; Syntax.........: _ProgressSetMarquee($iControl, $hHandle) ; Parameters ....: $iControl - A valid ProgressBar control ID. ; $hHandle - A valid GUI handle the ProgressBar is linked with. ; Requirement(s).: v3.3.0.0 or higher ; Return values .: Success - Returns a 2D Array with control ID and state of the ProgressBar. 0 = No Marquee effect Or 1 = Marquee effect. ; Author ........: guinness. ; Example........; Yes ;===================================================================================================================== Func _ProgressSetMarquee($iControl, $hHandle) Local $bType = 0, $iColor = -1, $iIndex = -1 If Not IsDeclared("Global_ProgressSetMarquee") Then Global $Global_ProgressSetMarquee[1][3] = [[0, 3]] For $A = 1 To $Global_ProgressSetMarquee[0][0] If @error Then ExitLoop If $Global_ProgressSetMarquee[$A][0] = $iControl Then $iIndex = $A $bType = $Global_ProgressSetMarquee[$iIndex][1] ExitLoop EndIf Next If $iIndex = -1 Then If $Global_ProgressSetMarquee[0][0] <= UBound($Global_ProgressSetMarquee, 1) + 1 Then ReDim $Global_ProgressSetMarquee[($Global_ProgressSetMarquee[0][0] + 1) * 2][$Global_ProgressSetMarquee[0][1]] $Global_ProgressSetMarquee[0][0] += 1 $iIndex = $Global_ProgressSetMarquee[0][0] $Global_ProgressSetMarquee[$iIndex][0] = $iControl $Global_ProgressSetMarquee[$iIndex][1] = $bType $Global_ProgressSetMarquee[$iIndex][2] = $iColor EndIf Local $hControl = GUICtrlGetHandle($Global_ProgressSetMarquee[$iIndex][0]), $aControlGetPos = ControlGetPos($hHandle, "", $Global_ProgressSetMarquee[$iIndex][0]) Local $aStyle = DllCall("user32.dll", "long", "GetWindowLong", "hwnd", $hControl, "int", 0xFFFFFFF0) Local $aExStyle = DllCall("user32.dll", "long", "GetWindowLong", "hwnd", $hControl, "int", 0xFFFFFFEC) If $aStyle[0] <> 1342308360 Then GUICtrlDelete($Global_ProgressSetMarquee[$iIndex][0]) $iControl = GUICtrlCreateProgress($aControlGetPos[0], $aControlGetPos[1], $aControlGetPos[2], $aControlGetPos[3], 0x0008, $aExStyle[0]) ; 0x0008 $hControl = GUICtrlGetHandle($iControl) If $Global_ProgressSetMarquee[$iIndex][2] <> -1 Then DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", $hControl, "wstr", 0, "wstr", 0) GUICtrlSetColor($iControl, $Global_ProgressSetMarquee[$iIndex][2]) EndIf $Global_ProgressSetMarquee[$iIndex][0] = $iControl EndIf Switch $Global_ProgressSetMarquee[$iIndex][1] Case 1 $bType = False Case Else $bType = True EndSwitch DllCall("user32.dll", "lresult", "SendMessageW", "hwnd", $hControl, "uint", 1034, "wparam", $bType, "lparam", 50) If @error Then $Global_ProgressSetMarquee[$iIndex][1] = 1 If $Global_ProgressSetMarquee[$iIndex][1] = 1 Then GUICtrlDelete($Global_ProgressSetMarquee[$iIndex][0]) $iControl = GUICtrlCreateProgress($aControlGetPos[0], $aControlGetPos[1], $aControlGetPos[2], $aControlGetPos[3], 0x0008, $aExStyle[0]) ; 0x0008 If $Global_ProgressSetMarquee[$iIndex][2] <> -1 Then DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($iControl), "wstr", 0, "wstr", 0) GUICtrlSetColor($iControl, $Global_ProgressSetMarquee[$iIndex][2]) EndIf $Global_ProgressSetMarquee[$iIndex][0] = $iControl $Global_ProgressSetMarquee[$iIndex][1] = 0 Return 0 EndIf $Global_ProgressSetMarquee[$iIndex][1] = 1 Return 1 EndFunc ;==>_ProgressSetMarquee ; #FUNCTION# ========================================================================================================= ; Name...........: _ProgressSetTheme ; Description ...: Sets a 'themed' ProgressBar with the ability to change the color of the ProgressBar. ; Syntax.........: _ProgressSetTheme([$iControl, [$bThemeColor]]) ; Parameters ....: $iControl - [optional] A valid ProgressBar control ID. Default = -1 (last control ID) ; $hHandle - [optional] A valid Hex color value. Default = 0x24D245 ; Requirement(s).: v3.3.0.0 or higher ; Return values .: Success - Returns a value from the 'SetWindowTheme' DLL call. ; Failure - Returns 0 with @extended set as 1. ; Author ........: guinness. ; Example........; Yes ;===================================================================================================================== Func _ProgressSetTheme($iControl = -1, $bThemeColor = 0x24D245) Local $bType = 0, $iColor = $bThemeColor, $iIndex = -1, $hControl = GUICtrlGetHandle($iControl) If Not IsDeclared("Global_ProgressSetMarquee") Then Global $Global_ProgressSetMarquee[1][3] = [[0, 3]] $iControl = DllCall("user32.dll", "int", "GetDlgCtrlID", "hwnd", $hControl) If @error Then Return SetError(1, 1, 0) $iControl = $iControl[0] For $A = 1 To $Global_ProgressSetMarquee[0][0] If @error Then ExitLoop If $Global_ProgressSetMarquee[$A][0] = $iControl Then If $Global_ProgressSetMarquee[$A][1] = 1 Then Return SetError(1, 1, 0) ; Marquee is already running. $iIndex = $A $bType = $Global_ProgressSetMarquee[$iIndex][1] ExitLoop EndIf Next If $iIndex = -1 Then If $Global_ProgressSetMarquee[0][0] <= UBound($Global_ProgressSetMarquee, 1) + 1 Then ReDim $Global_ProgressSetMarquee[($Global_ProgressSetMarquee[0][0] + 1) * 2][$Global_ProgressSetMarquee[0][1]] $Global_ProgressSetMarquee[0][0] += 1 $iIndex = $Global_ProgressSetMarquee[0][0] $Global_ProgressSetMarquee[$iIndex][0] = $iControl $Global_ProgressSetMarquee[$iIndex][1] = $bType $Global_ProgressSetMarquee[$iIndex][2] = $iColor EndIf Local $aReturn = DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", $hControl, "wstr", 0, "wstr", 0) If @error Then Return SetError(1, 1, 0) GUICtrlSetColor($iControl, $Global_ProgressSetMarquee[$iIndex][2]) Return $aReturn[0] EndFunc ;==>_ProgressSetTheme
Example use of Function with inc. theming:
AutoIt
#include <GUIConstantsEx.au3> _Main() Func _Main() Local $GUI, $Progress_1, $Button_1, $Return, $Read $GUI = GUICreate("_ProgressSetMarquee()", 240, 90, -1, -1) $Progress_1 = GUICtrlCreateProgress(10, 10, 220, 20, 0x0008) ; 0x0008 = $PBS_MARQUEE From <ProgressConstants.au3> _ProgressSetTheme() ; <<<<< Set the Theme to the last control ID with Default values. $Button_1 = GUICtrlCreateButton("&Start", 85, 60, 70, 25) GUISetState(@SW_SHOW) While 1 Switch GUIGetMsg() Case -3 Exit Case $Button_1 $Return = _ProgressSetMarquee($Progress_1, $GUI) If $Return Then $Read = GUICtrlRead($Button_1) GUICtrlSetData($Button_1, "&Stop") Else GUICtrlSetData($Button_1, $Read) EndIf EndSwitch WEnd EndFunc ;==>_Main ; #FUNCTION# ========================================================================================================= ; Name...........: _ProgressSetMarquee ; Description ...: Starts/Stops the $PBS_MARQUEE effect on a GUICtrlCreateProgress() control. ; Syntax.........: _ProgressSetMarquee($iControl, $hHandle) ; Parameters ....: $iControl - A valid ProgressBar control ID. ; $hHandle - A valid GUI handle the ProgressBar is linked with. ; Requirement(s).: v3.3.0.0 or higher ; Return values .: Success - Returns a 2D Array with control ID and state of the ProgressBar. 0 = No Marquee effect Or 1 = Marquee effect. ; Author ........: guinness. ; Example........; Yes ;===================================================================================================================== Func _ProgressSetMarquee($iControl, $hHandle) Local $bType = 0, $iColor = -1, $iIndex = -1 If Not IsDeclared("Global_ProgressSetMarquee") Then Global $Global_ProgressSetMarquee[1][3] = [[0, 3]] For $A = 1 To $Global_ProgressSetMarquee[0][0] If @error Then ExitLoop If $Global_ProgressSetMarquee[$A][0] = $iControl Then $iIndex = $A $bType = $Global_ProgressSetMarquee[$iIndex][1] ExitLoop EndIf Next If $iIndex = -1 Then If $Global_ProgressSetMarquee[0][0] <= UBound($Global_ProgressSetMarquee, 1) + 1 Then ReDim $Global_ProgressSetMarquee[($Global_ProgressSetMarquee[0][0] + 1) * 2][$Global_ProgressSetMarquee[0][1]] $Global_ProgressSetMarquee[0][0] += 1 $iIndex = $Global_ProgressSetMarquee[0][0] $Global_ProgressSetMarquee[$iIndex][0] = $iControl $Global_ProgressSetMarquee[$iIndex][1] = $bType $Global_ProgressSetMarquee[$iIndex][2] = $iColor EndIf Local $hControl = GUICtrlGetHandle($Global_ProgressSetMarquee[$iIndex][0]), $aControlGetPos = ControlGetPos($hHandle, "", $Global_ProgressSetMarquee[$iIndex][0]) Local $aStyle = DllCall("user32.dll", "long", "GetWindowLong", "hwnd", $hControl, "int", 0xFFFFFFF0) Local $aExStyle = DllCall("user32.dll", "long", "GetWindowLong", "hwnd", $hControl, "int", 0xFFFFFFEC) If $aStyle[0] <> 1342308360 Then GUICtrlDelete($Global_ProgressSetMarquee[$iIndex][0]) $iControl = GUICtrlCreateProgress($aControlGetPos[0], $aControlGetPos[1], $aControlGetPos[2], $aControlGetPos[3], 0x0008, $aExStyle[0]) ; 0x0008 $hControl = GUICtrlGetHandle($iControl) If $Global_ProgressSetMarquee[$iIndex][2] <> -1 Then DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", $hControl, "wstr", 0, "wstr", 0) GUICtrlSetColor($iControl, $Global_ProgressSetMarquee[$iIndex][2]) EndIf $Global_ProgressSetMarquee[$iIndex][0] = $iControl EndIf Switch $Global_ProgressSetMarquee[$iIndex][1] Case 1 $bType = False Case Else $bType = True EndSwitch DllCall("user32.dll", "lresult", "SendMessageW", "hwnd", $hControl, "uint", 1034, "wparam", $bType, "lparam", 50) If @error Then $Global_ProgressSetMarquee[$iIndex][1] = 1 If $Global_ProgressSetMarquee[$iIndex][1] = 1 Then GUICtrlDelete($Global_ProgressSetMarquee[$iIndex][0]) $iControl = GUICtrlCreateProgress($aControlGetPos[0], $aControlGetPos[1], $aControlGetPos[2], $aControlGetPos[3], 0x0008, $aExStyle[0]) ; 0x0008 If $Global_ProgressSetMarquee[$iIndex][2] <> -1 Then DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($iControl), "wstr", 0, "wstr", 0) GUICtrlSetColor($iControl, $Global_ProgressSetMarquee[$iIndex][2]) EndIf $Global_ProgressSetMarquee[$iIndex][0] = $iControl $Global_ProgressSetMarquee[$iIndex][1] = 0 Return 0 EndIf $Global_ProgressSetMarquee[$iIndex][1] = 1 Return 1 EndFunc ;==>_ProgressSetMarquee ; #FUNCTION# ========================================================================================================= ; Name...........: _ProgressSetTheme ; Description ...: Sets a 'themed' ProgressBar with the ability to change the color of the ProgressBar. ; Syntax.........: _ProgressSetTheme([$iControl, [$bThemeColor]]) ; Parameters ....: $iControl - [optional] A valid ProgressBar control ID. Default = -1 (last control ID) ; $hHandle - [optional] A valid Hex color value. Default = 0x24D245 ; Requirement(s).: v3.3.0.0 or higher ; Return values .: Success - Returns a value from the 'SetWindowTheme' DLL call. ; Failure - Returns 0 with @extended set as 1. ; Author ........: guinness. ; Example........; Yes ;===================================================================================================================== Func _ProgressSetTheme($iControl = -1, $bThemeColor = 0x24D245) Local $bType = 0, $iColor = $bThemeColor, $iIndex = -1, $hControl = GUICtrlGetHandle($iControl) If Not IsDeclared("Global_ProgressSetMarquee") Then Global $Global_ProgressSetMarquee[1][3] = [[0, 3]] $iControl = DllCall("user32.dll", "int", "GetDlgCtrlID", "hwnd", $hControl) If @error Then Return SetError(1, 1, 0) $iControl = $iControl[0] For $A = 1 To $Global_ProgressSetMarquee[0][0] If @error Then ExitLoop If $Global_ProgressSetMarquee[$A][0] = $iControl Then If $Global_ProgressSetMarquee[$A][1] = 1 Then Return SetError(1, 1, 0) ; Marquee is already running. $iIndex = $A $bType = $Global_ProgressSetMarquee[$iIndex][1] ExitLoop EndIf Next If $iIndex = -1 Then If $Global_ProgressSetMarquee[0][0] <= UBound($Global_ProgressSetMarquee, 1) + 1 Then ReDim $Global_ProgressSetMarquee[($Global_ProgressSetMarquee[0][0] + 1) * 2][$Global_ProgressSetMarquee[0][1]] $Global_ProgressSetMarquee[0][0] += 1 $iIndex = $Global_ProgressSetMarquee[0][0] $Global_ProgressSetMarquee[$iIndex][0] = $iControl $Global_ProgressSetMarquee[$iIndex][1] = $bType $Global_ProgressSetMarquee[$iIndex][2] = $iColor EndIf Local $aReturn = DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", $hControl, "wstr", 0, "wstr", 0) If @error Then Return SetError(1, 1, 0) GUICtrlSetColor($iControl, $Global_ProgressSetMarquee[$iIndex][2]) Return $aReturn[0] EndFunc ;==>_ProgressSetTheme
Edited by guinness, 08 October 2012 - 03:12 PM.






