Opened 16 years ago
Closed 16 years ago
#555 closed Bug (Works For Me)
bug in _GUICtrlListView UDF
Reported by: | anonymous | Owned by: | Gary |
---|---|---|---|
Milestone: | Component: | Standard UDFs | |
Version: | 3.2.12.0 | Severity: | None |
Keywords: | Cc: |
Description
_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
Attachments (0)
Change History (3)
comment:1 Changed 16 years ago by anonymous
comment:2 Changed 16 years ago by Gary
Show some code where the old doesn't work. Not seeing any problem with the current code in the include.
comment:3 Changed 16 years ago by Gary
- Resolution set to Works For Me
- Status changed from new to closed
Closing as works for me.
Guidelines for posting comments:
- You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
- In-depth discussions should take place on the forum.
For more information see the full version of the ticket guidelines here.
I think, some other Functions have to be changed then, too :)
_GUICtrlListView_SetItemDropHilited is correct, but it didn't work with the old _GUICtrlListView_SetItemState, with the corrected one, the DropHilite can be deleted again.