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)
follow-up: 2 comment:1 by , 15 years ago
comment:2 by , 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:4 by , 15 years ago
| Milestone: | → 3.3.7.0 |
|---|---|
| Owner: | changed from to |
| Resolution: | → Fixed |
| Status: | new → closed |
Fixed by revision [5964] in version: 3.3.7.0
Note:
See TracTickets
for help on using tickets.

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