Jump to content

why i get error?


Recommended Posts

this is the code:

#include <GuiConstantsEx.au3>
#include <GuiListView.au3>

$hGui = GuiCreate("TestGui", 200, 100)

$hListView = _GUICtrlListView_Create($hGui, "Item|Subitem", 5, 5, 195, 50)
$LV_Item1 = _GUICtrlListView_AddItem($hListView, "Item1")

GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY")

GUISetState()

While 1
    $msg = GUIGetMsg()
    Switch $msg
    Case $GUI_EVENT_CLOSE
        ExitLoop
    EndSwitch
WEnd

Func WM_NOTIFY($hWnd, $Msg, $wParam, $lParam)
    Local $hWndFrom, $iCode, $tNMHDR, $hWndListView
    $hWndListView = $hListView
    If Not IsHWnd($hWndListView) Then $hWndListView = GUICtrlGetHandle($hListView)

    $tNMHDR = DllStructCreate($tagNMHDR, $lParam)
    $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom"))
    $iCode = DllStructGetData($tNMHDR, "Code")
    
    Switch $hWndFrom
    Case $hWndListView
        Switch $iCode
        Case $NM_DBLCLK
            MsgBox(0, "", "Double click")
        EndSwitch
    EndSwitch
    
    Return $GUI_RUNDEFMSG
EndFunc

and picture:

http://www.zix.co.il/images/z-777430091.jpg

Posted Image

oh and my OS is Vista Eng x64

Autoit: v3.2.12.1

thanks!

Link to comment
Share on other sites

  • Developers

use these includes:

#include <GUIConstantsEx.au3>

#include <GuiListView.au3>

#include <StructureConstants.au3>

#include <WindowsConstants.au3>

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

slove..

Slove = Solved ? :)

so why need to get:

MsgBox(0, "", "Double click") (line 37)

??

It only shows the MSGBOX() for me when I actually double click.

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

when im double click its not show me nothing..

and you thank you about the fixing work Slove :P my ingysh bad :)

by the way, can u complise EXE and the upload me? maybe there is problem on me O_o

You are Double clicking the cell containing "Item1"... right ?

I am testing in WinXP and haven't tested in Vista.

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...