Modify

Opened 14 years ago

Closed 14 years ago

#1836 closed Bug (Fixed)

_GUICtrlTreeView_InsertItem should return a handle, but it not

Reported by: Ward Owned by: Jpm
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 follow-up: Changed 14 years ago by Jpm

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

comment:2 in reply to: ↑ 1 Changed 14 years ago by anonymous

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 Changed 14 years ago by Jpm

Oh, I see the type of the variable .
Thanks

comment:4 Changed 14 years ago by Jpm

  • Milestone set to 3.3.7.0
  • Owner changed from Gary to Jpm
  • Resolution set to Fixed
  • Status changed from new to closed

Fixed by revision [5964] in version: 3.3.7.0

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.

Add Comment

Modify Ticket

Action
as closed The owner will remain Jpm.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.