Modify

Opened 15 years ago

Closed 15 years ago

#1836 closed Bug (Fixed)

_GUICtrlTreeView_InsertItem should return a handle, but it not

Reported by: Ward Owned by: J-Paul Mesnage
Milestone: 3.3.7.0 Component: Standard UDFs
Version: 3.3.6.1 Severity: None
Keywords: Cc:

Description

Easy to correct. Add "handle" as last parameter to _SendMessage in _GUICtrlTreeView_InsertItem UDF. Just like _GUICtrlTreeView_AddItem does.

Attachments (0)

Change History (4)

comment:1 by J-Paul Mesnage, 15 years ago

I don't understand as _GUICtrlTreeView_InsertItem() is returning an Handle.
_GUICtrlTreeView_AddItem() is not an udf GUICtrlTreeView_AddItem() is an internal UDF.

Can you post a repro script? Thanks

in reply to:  1 comment:2 by anonymous, 15 years ago

In source of GuiTreeView.au3, there is a GUICtrlTreeView_AddItem and _GUICtrlTreeView_InsertItem.

In GUICtrlTreeView_AddItem, following code is ok.

If $fUnicode Then
	$hResult = _SendMessage($hWnd, $TVM_INSERTITEMW, 0, $pMemory, 0, "wparam", "ptr", "handle")
Else
	$hResult = _SendMessage($hWnd, $TVM_INSERTITEMA, 0, $pMemory, 0, "wparam", "ptr", "handle")
EndIf

But in _GUICtrlTreeView_InsertItem, following code has problem. $hItem is not returned as "handle".

If $fUnicode Then
	$hItem = _SendMessage($hWnd, $TVM_INSERTITEMW, 0, $pMemory, 0, "wparam", "ptr")
Else
	$hItem = _SendMessage($hWnd, $TVM_INSERTITEMA, 0, $pMemory, 0, "wparam", "ptr")
EndIf

The return type "handle" should be add as last parameter in _SendMessage of _GUICtrlTreeView_InsertItem.

comment:3 by J-Paul Mesnage, 15 years ago

Oh, I see the type of the variable .
Thanks

comment:4 by J-Paul Mesnage, 15 years ago

Milestone: 3.3.7.0
Owner: changed from Gary to J-Paul Mesnage
Resolution: Fixed
Status: newclosed

Fixed by revision [5964] in version: 3.3.7.0

Modify Ticket

Action
as closed The owner will remain J-Paul Mesnage.

Add Comment


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