﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
555	bug in _GUICtrlListView UDF	anonymous	Gary	"_GUICtrlListView_SetItemDropHilited  didnt work properly, so we tried to find out why.

_GUICtrlListView_SetItemState is buggy. in UDF Doc it says:

;                  $iState      - Item state to be changed
;                  $iStateMask  - Bits that determine whether state is active or inactive

those Values are used for creating a dll struct. the problem now is:

StateMask is the Item state to be changed,
State are the Bits determining the state is activ or not (

this version should work, but I just tested _GUICtrlListView_SetItemDropHilited , which seems to work fine now

{{{
; #FUNCTION# ====================================================================================================================
; Name...........: _GUICtrlListView_SetItemState
; Description ...: Changes the state of an item in the control
; Syntax.........: _GUICtrlListView_SetItemState($hWnd, $iIndex, $iState, $iStateMask)
; Parameters ....: $hWnd        - Handle to the control
;                  $iIndex      - Zero based index of the item
;                  $iStateMask  - Item state to be changed
;                  $iState		- Bits that determine whether state is active or inactive
; Return values .: Success      - True
;                  Failure      - False
; Author ........: Paul Campbell (PaulIA)
; Modified.......:
; Remarks .......:
; Related .......: _GUICtrlListView_GetItemState
; Link ..........;
; Example .......; Yes
; ===============================================================================================================================
Func _GUICtrlListView_SetItemState($hWnd, $iIndex, $iStateMask, $iState)
	Local $tItem

	$tItem = DllStructCreate($tagLVITEM)
	DllStructSetData($tItem, ""Mask"", $LVIF_STATE)
	DllStructSetData($tItem, ""Item"", $iIndex)
	DllStructSetData($tItem, ""StateMask"", $iStateMask)
	DllStructSetData($tItem, ""State"", $iState)
	
	Return _GUICtrlListView_SetItemEx($hWnd, $tItem) <> 0
EndFunc   ;==>_GUICtrlListView_SetItemState
}}}"	Bug	closed		Standard UDFs	3.2.12.0	None	Works For Me		
