Hi guys,
I'm using the _ProgressMarquee by guinness. Work fine, but i have a little problem.
If i remove the style to the GUICtrlCreateProgress, the size of the red element is too little ( i don't know how to call it
)
And also i have lost the smooth to the red element. Anyway, how to make it bigger?![:D]()
I'm using the _ProgressMarquee by guinness. Work fine, but i have a little problem.
If i remove the style to the GUICtrlCreateProgress, the size of the red element is too little ( i don't know how to call it
![:D](http://aut1.autoit-cdn.com/forum/public/style_emoticons/default/biggrin.png)
And also i have lost the smooth to the red element. Anyway, how to make it bigger?
![:D](http://aut1.autoit-cdn.com/forum/public/style_emoticons/default/biggrin.png)
[ autoit ]
#include <WinAPI.au3> #include <Constants.au3> #include <GUIConstantsEx.au3> #include <ProgressConstants.au3> $Form1 = GUICreate("TestProgress", 370, 101, 192, 124) $Button1 = GUICtrlCreateButton("Start", 8, 8, 65, 33) $Button2 = GUICtrlCreateButton("Stop", 80, 8, 57, 33) $Progress = GUICtrlCreateProgress(8, 48, 353, 33) DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Progress), "wstr", 0, "wstr", 0) GUICtrlSetColor(-1, 0xFF0000) GUISetBkColor(0x000000) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 _ProgressMarquee_Start($Progress) Case $Button2 _ProgressMarquee_Stop($Progress, 1) EndSwitch WEnd Func _ProgressMarquee_Start($iControlID = -1) Local $aArray = GUICtrlGetStyle($iControlID) If Not BitAND($PBS_MARQUEE, $aArray[0]) Then GUICtrlSetStyle($iControlID, $PBS_MARQUEE) EndIf Return GUICtrlSendMsg($iControlID, $PBM_SETMARQUEE, 1, 50) EndFunc ;==>_ProgressMarquee_Start Func _ProgressMarquee_Stop($iControlID = -1, $iReset = 0) If $iReset Then Return GUICtrlSetStyle($iControlID, 0) EndIf Return GUICtrlSendMsg($iControlID, $PBM_SETMARQUEE, 0, 50) EndFunc ;==>_ProgressMarquee_Stop Func GUICtrlGetStyle($iControlID) Local $aArray[2] = [-1, -1], $hControl = GUICtrlGetHandle($iControlID) $aArray[0] = _WinAPI_GetWindowLong($hControl, $GWL_STYLE) $aArray[1] = _WinAPI_GetWindowLong($hControl, $GWL_EXSTYLE) Return $aArray EndFunc ;==>GUICtrlGetStyle