Modify ↓
Opened 16 years ago
Closed 16 years ago
#1582 closed Bug (Fixed)
_GUICtrlListView_GetHeader returns no handle
| Reported by: | funkey | Owned by: | J-Paul Mesnage |
|---|---|---|---|
| Milestone: | 3.3.7.0 | Component: | AutoIt |
| Version: | 3.3.6.0 | Severity: | None |
| Keywords: | Cc: |
Description
#include <GuiListView.au3>
Local $hGui = GUICreate("Bug-Test")
Local $hLV = GUICtrlCreateListView("Test", 0, 0)
Local $hHeader1 = _GUICtrlListView_GetHeader($hLV)
Local $hHeader2 = HWnd(_GUICtrlListView_GetHeader($hLV))
Local $aPos1 = ControlGetPos($hGui, "", $hHeader1)
Local $aPos2 = ControlGetPos($hGui, "", $hHeader2)
If Not IsArray($aPos1) Then MsgBox(16, "Error", "$hHeader1 is no handle!")
If Not IsArray($aPos2) Then MsgBox(16, "Error", "$hHeader2 is no handle!")
ConsoleWrite($hHeader1 & @CR)
ConsoleWrite($hHeader2 & @CR)
Attachments (0)
Change History (5)
comment:1 by , 16 years ago
comment:2 by , 16 years ago
That has nothing to do with mixing function. Sorry, but I would not post this problem when I did not have a look on to that.
#include <GuiListView.au3>
Local $hGui = GUICreate("Bug-Test")
Local $hLV = _GUICtrlListView_Create($hGui, "Test", 0, 0)
Local $hHeader1 = _GUICtrlListView_GetHeader($hLV)
Local $hHeader2 = HWnd(_GUICtrlListView_GetHeader($hLV))
Local $aPos1 = ControlGetPos($hGui, "", $hHeader1)
Local $aPos2 = ControlGetPos($hGui, "", $hHeader2)
If Not IsArray($aPos1) Then MsgBox(16, "Error", "$hHeader1 is no handle!")
If Not IsArray($aPos2) Then MsgBox(16, "Error", "$hHeader2 is no handle!")
ConsoleWrite($hHeader1 & @CR)
ConsoleWrite($hHeader2 & @CR)
comment:3 by , 16 years ago
Both variants work in AutoIt v. 3.3.4.0 - 3.3.6.1
But you have to use:
_GUICtrlListView_GetHeader(GuiCtrlGetHandle($hLV))
comment:4 by , 16 years ago
| Owner: | set to |
|---|---|
| Status: | new → assigned |
comment:5 by , 16 years ago
| Milestone: | → 3.3.7.0 |
|---|---|
| Resolution: | → Fixed |
| Status: | assigned → closed |
Fixed by revision [5787] in version: 3.3.7.0
Note:
See TracTickets
for help on using tickets.

I assume you are in the same problem of mixing GUICtrlCreate...() builtin functions and _GUICtrl...() UDF functions.
Try to use _GUICtrlListview_Create() instead of GUICtrlCreateListview()
Some UDF works but not all in the mixing mode ...
Such mixing mode must be avoid.
I know that some _GUICtrl...() doc examples are using this mixed mode but that too good. They are so may example to check that perhaps some day I will check them ;)