Sign in to follow this  
Followers 0
Gillboss

why i get error?

7 posts in this topic

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!

Share this post


Link to post
Share on other sites



use these includes:

#include <GUIConstantsEx.au3>

#include <GuiListView.au3>

#include <StructureConstants.au3>

#include <WindowsConstants.au3>


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

slove.. so why need to get:

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

??

Share this post


Link to post
Share on other sites

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.

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

oops!

i have to run it as "Run Script (x86)"

hmmm and quetion if i want complise it, will it work on xp?

Share this post


Link to post
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
Sign in to follow this  
Followers 0