Modify ↓
Opened on Apr 23, 2010 at 1:58:30 PM
Closed on May 3, 2010 at 6:23:51 AM
#1582 closed Bug (Fixed)
_GUICtrlListView_GetHeader returns no handle
| Reported by: | funkey | Owned by: | Jpm |
|---|---|---|---|
| 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:2 by , on Apr 24, 2010 at 3:19:52 PM
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 , on Apr 28, 2010 at 2:12:59 AM
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 , on Apr 30, 2010 at 10:54:59 PM
| Owner: | set to |
|---|---|
| Status: | new → assigned |
comment:5 by , on May 3, 2010 at 6:23:51 AM
| 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 ;)