﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
4093	_GUICtrlListView_GetItem() - Item state - $aItem[0] = 0	mLipok		"I was trying to find a solution to one of my problem here:
https://www.autoitscript.com/forum/topic/213679-listview-get-igroupid-and-igroup-for-listviewitem/#findComment-1552336

And I notice that according to:
https://www.autoitscript.com/autoit3/files/beta/autoit/docs/libfunctions/_GUICtrlListView_GetItem.htm

{{{
Returns an array with the following format:
    [0] - Item state, which can be a combination of the following:
        1 - The item is marked for a cut-and-paste operation
        2 - The item is highlighted as a drag-and-drop target
        4 - The item has the focus
        8 - The item is selected
}}}

For this reason I expected one of these values ​​or a combination of them, and if not, I expected a value of 0.

please consider to add this one line:
{{{#!autoit
$aItem[0] = 0
}}}

like this:

{{{#!autoit lineno=1 marks=12
Func _GUICtrlListView_GetItem($hWnd, $iIndex, $iSubItem = 0)
	Local $tItem = $__g_tListViewItem

	DllStructSetData($tItem, ""Mask"", BitOR($LVIF_GROUPID, $LVIF_IMAGE, $LVIF_INDENT, $LVIF_PARAM, $LVIF_STATE))
	DllStructSetData($tItem, ""Item"", $iIndex)
	DllStructSetData($tItem, ""SubItem"", $iSubItem)
	DllStructSetData($tItem, ""StateMask"", -1)
	_GUICtrlListView_GetItemEx($hWnd, $tItem)

	Local $iState = DllStructGetData($tItem, ""State"")
	Local $aItem[8]
	$aItem[0] = 0
	If BitAND($iState, $LVIS_CUT) <> 0 Then $aItem[0] = BitOR($aItem[0], 1)
	If BitAND($iState, $LVIS_DROPHILITED) <> 0 Then $aItem[0] = BitOR($aItem[0], 2)
	If BitAND($iState, $LVIS_FOCUSED) <> 0 Then $aItem[0] = BitOR($aItem[0], 4)
	If BitAND($iState, $LVIS_SELECTED) <> 0 Then $aItem[0] = BitOR($aItem[0], 8)
	$aItem[1] = __GUICtrlListView_OverlayImageMaskToIndex($iState)
	$aItem[2] = __GUICtrlListView_StateImageMaskToIndex($iState)
	$aItem[3] = _GUICtrlListView_GetItemText($hWnd, $iIndex, $iSubItem)
	$aItem[4] = DllStructGetData($tItem, ""Image"")
	$aItem[5] = DllStructGetData($tItem, ""Param"")
	$aItem[6] = DllStructGetData($tItem, ""Indent"")
	$aItem[7] = DllStructGetData($tItem, ""GroupID"")

	Return $aItem
EndFunc   ;==>_GUICtrlListView_GetItem
}}}"	Feature Request	new		Standard UDFs		None			
