﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
1326	_GuiCtrlListView_DeleteItem does not handle control ID correctly	martin	Gary	"_GuiCtrlListView_DeleteItem works if the listview handle is passed but not if the control ID is passed.
The existing function is
{{{
; #FUNCTION# ====================================================================================================================
; Name...........: _GUICtrlListView_DeleteItem
; Description ...: Removes an item from a list-view control
; Syntax.........: _GUICtrlListView_DeleteItem($hWnd, $iIndex)
; Parameters ....: $hWnd        - Control ID/Handle to the control
;                  $iIndex      - Zero based index of the list-view item to delete
; Return values .: Success      - True
;                  Failure      - False
; Author ........: Gary Frost (gafrost)
; Modified.......:
; Remarks .......:
; Related .......: _GUICtrlListView_DeleteAllItems, _GUICtrlListView_DeleteItemsSelected
; Link ..........:
; Example .......: Yes
; ===============================================================================================================================
Func _GUICtrlListView_DeleteItem($hWnd, $iIndex)
	If $Debug_LV Then __UDF_ValidateClassName($hWnd, $__LISTVIEWCONSTANT_ClassName)

	If IsHWnd($hWnd) Then
		Return _SendMessage($hWnd, $LVM_DELETEITEM, $iIndex) <> 0
	Else
		Local $ctrlID = _GUICtrlListView_GetItemParam($hWnd, $iIndex)
		If $ctrlID Then Return GUICtrlDelete($ctrlID) <> 0
	EndIf
	Return False
EndFunc   ;==>_GUICtrlListView_DeleteItem
}}}
This could be
{{{
Func _GUICtrlListView_DeleteItem($hWnd, $iIndex)
	If $Debug_LV Then __UDF_ValidateClassName($hWnd, $__LISTVIEWCONSTANT_ClassName)

	If IsHWnd($hWnd) Then
		Return _SendMessage($hWnd, $LVM_DELETEITEM, $iIndex) <> 0
	Else
	 Return GuiCtrlSendMsg($hWnd, $LVM_DELETEITEM, $iIndex,0)  <> 0
	EndIf
EndFunc   ;==>_GUICtrlListView_DeleteItem
}}} "	Bug	closed		Standard UDFs	3.3.0.0	None	No Bug	_GUICtrlListView_DeleteItem	
