Modify

#763 closed Bug (Fixed)

GUICtrlCreateIcon returns a 0 handle but doesn't destroy the created control.

Reported by: Jos Owned by: Jpm
Milestone: 3.3.1.0 Component: AutoIt
Version: 3.3.0.0 Severity: None
Keywords: Cc:

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

Attachments (0)

Change History (1)

comment:1 by Jpm, on Jan 6, 2009 at 8:08:50 AM

Milestone: 3.3.1.0
Owner: set to Jpm
Resolution: Fixed
Status: newclosed

Fixed in version: 3.3.1.0

Modify Ticket

Action
as closed The owner will remain Jpm.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.