Custom Query

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (211 - 213 of 3865)

Ticket Resolution Summary Owner Reporter
#763 Fixed GUICtrlCreateIcon returns a 0 handle but doesn't destroy the created control. Jpm Jos
Description

GUICtrlCreateIcon returns a 0 handle but doesn't destroy the created control when the specified inpuyt DLL doesn't exists. It should either return the valid handle for the control and only set @Error or Delete the Control when UpdateICON() routine fails.

$gui = GUICreate("TEST")
GUISetBkColor(0x0A659C)
$a = GUICtrlCreateIcon(@SystemDir & "\shell32.dll", -22, 10, 10, 32, 32)
ConsoleWrite("$a = " & $a & "- " & @error & @CRLF)
$b = GUICtrlCreateIcon("aNonExistantFileName.dll", -22, 10, 52, 32, 32)
ConsoleWrite("$b = " & $b & "- " & @error & @CRLF)
GUISetState()
Do
	Sleep(10)
Until GUIGetMsg() = -3
#773 Fixed _GUICtrlStatusBar_SetParts() - badly documented parameters Gary Zedna
Description

C:\Program Files\AutoIt3\UDFs3.chm::/html/libfunctions/_GUICtrlStatusBar_SetParts

_GUICtrlStatusBar_SetParts($hWnd[, $iaParts = -1[, $iaPartWidth = 25]])

There are 3 parameters but in table of parameters in CHM helpfile there are documented only 2. Second and third ones are mixed together.

$hWnd Handle to the control 

$iaParts Number of parts, can be an zero based array of ints in the following format:
$iaParts[0] - Right edge of part #1
$iaParts[1] - Right edge of part #2
$iaParts[n] - Right edge of parn n

#774 Fixed GUICtrlSetBkColor delayed mishap.(Labels turn White) Jpm MvGulik
Description

following code displays a window with a 10x10 label grid. while running, the label's background color is continus changed (random label + random color) after running for some time, all labels turn white. ps: move mouse around to speed things up. (~15x Faster)+(mishap after ~5sec/2.4Mhz) Also when the labels are white, moving the window also gives odd screen behaviors. a compleetly gray screen for example. [Environment = 3.3.0.0 under WIN_XP/Service Pack 3 X86]

#cs
	GUICtrlSetBkColor delayed mishap.(Labels turn White)
	following code displays a window with a 10x10 label grid.
	while running, the label's background color is continus changed (random label + random color)
	after running for some time, all labels turn white.
	* move mouse around to speed things up. (~15x Faster)+(mishap after ~5sec/2.4Mhz)
	Also when the labels are white, moving the window also gives odd screen behaviors.
	- compleetly gray screen for example.
	[Environment = 3.3.0.0 under  WIN_XP/Service Pack 3 X86]
#ce

#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <Array.au3>

;~ #include <Debug.au3>
;~ ConsoleWrite( _DebugBugReportEnv() & @CRLF)

Global Enum _
		$LED_COUNT_X, _
		$LED_COUNT_Y, _
		$LED_SIZE_X, _
		$LED_SIZE_Y, _
		$LED_MARGEN_X, _
		$LED_MARGEN_Y, _
		$WINDOW_MARGEN_XY, _
		$LEDGROUP_SIZE_X, _
		$LEDGROUP_SIZE_Y, _
		$WINDOW_SIZE_X, _
		$WINDOW_SIZE_Y, _
		$WINDOW_ID, _
		$Data_A_Size

Global $Data_A[$Data_A_Size]

$Data_A[$LED_COUNT_X] = 10
$Data_A[$LED_COUNT_Y] = 10
$Data_A[$LED_SIZE_X] = 20
$Data_A[$LED_SIZE_Y] = 20
$Data_A[$LED_MARGEN_X] = 4
$Data_A[$LED_MARGEN_Y] = 4
$Data_A[$WINDOW_MARGEN_XY] = 10

$Data_A[$LEDGROUP_SIZE_X] = _
		($Data_A[$LED_SIZE_X] * $Data_A[$LED_COUNT_X]) + _
		($Data_A[$LED_MARGEN_X] * ($Data_A[$LED_COUNT_X] + 1))
$Data_A[$LEDGROUP_SIZE_Y] = _
		($Data_A[$LED_SIZE_Y] * $Data_A[$LED_COUNT_Y]) + _
		($Data_A[$LED_MARGEN_Y] * ($Data_A[$LED_COUNT_Y] + 1))
$Data_A[$WINDOW_SIZE_X] = $Data_A[$LEDGROUP_SIZE_X] + ($Data_A[$WINDOW_MARGEN_XY] * 2)
$Data_A[$WINDOW_SIZE_Y] = $Data_A[$LEDGROUP_SIZE_Y] + ($Data_A[$WINDOW_MARGEN_XY] * 2)

Global Enum _
		$LED_ID, _
		$LED_COL, _
		$Led_A_Size

Global $Led_A[($Data_A[$LED_COUNT_X] * $Data_A[$LED_COUNT_Y]) + 1][$Led_A_Size]

SRandom(Mod(TimerInit(), 2 ^ 32) - (2 ^ 31)) ;; (SRandom,InputRange: -2^31..2^31-1)

MAIN()
Exit

Func MAIN()
	BuildGui()
	GuiWait()
;~ 	_ArrayDisplay($Led_A) ;; to show that colors are not set to same color/white.
EndFunc   ;==>MAIN

Func BuildGui()
	$Data_A[$WINDOW_ID] = GUICreate('Colorful Led Test', $Data_A[$WINDOW_SIZE_X], $Data_A[$WINDOW_SIZE_Y], -1, -1)
	GUICtrlCreateLabel('', _
			$Data_A[$WINDOW_MARGEN_XY], $Data_A[$WINDOW_MARGEN_XY], _
			$Data_A[$LEDGROUP_SIZE_X], $Data_A[$LEDGROUP_SIZE_Y], _
			$SS_ETCHEDFRAME)

	Local $Style = $SS_SUNKEN
	If ($Data_A[$LED_MARGEN_X] < 2) Or ($Data_A[$LED_MARGEN_Y] < 2) Then $Style = 0

	Local $LedNr = 0
	Local $PosX, $PosY
	For $iy = 1 To $Data_A[$LED_COUNT_Y]
		For $ix = 1 To $Data_A[$LED_COUNT_X]
			$LedNr += 1
			$PosX = (($ix - 1) * ($Data_A[$LED_SIZE_X] + $Data_A[$LED_MARGEN_X])) + $Data_A[$LED_MARGEN_X] + $Data_A[$WINDOW_MARGEN_XY]
			$PosY = (($iy - 1) * ($Data_A[$LED_SIZE_Y] + $Data_A[$LED_MARGEN_Y])) + $Data_A[$LED_MARGEN_Y] + $Data_A[$WINDOW_MARGEN_XY]
			$Led_A[$LedNr][$LED_ID] = GUICtrlCreateLabel('', $PosX, $PosY, _
					$Data_A[$LED_SIZE_X], $Data_A[$LED_SIZE_Y], _
					$Style)
		Next
	Next
	GUISetState(@SW_SHOW, $Data_A[$WINDOW_ID])
EndFunc   ;==>BuildGui

Func GuiWait()
	Local $msg
	While 1
		Do
			$msg = GUIGetMsg()
			If $msg = $GUI_EVENT_CLOSE Then ExitLoop 2
		Until Not $msg
		Led_Set()
	WEnd
EndFunc   ;==>GuiWait

Func Led_Set()
	Local $LEdColor = RndColor()
	Local $LedNr = Random(1, UBound($Led_A, 1) - 1, 1)
	$Led_A[$LedNr][$LED_COL] = $LEdColor
	GUICtrlSetBkColor($Led_A[$LedNr][$LED_ID], $LEdColor)

EndFunc   ;==>Led_Set

Func RndColor()
	Local $r, $g, $b
	$r = BitShift(Round(Random() * 255), -16)
	$g = BitShift(Round(Random() * 255), -8)
	$b = BitShift(Round(Random() * 255), 0)
	Return $r + $g + $b
EndFunc   ;==>RndColor
Note: See TracQuery for help on using queries.