WIN7 64位 ListView事件响应不了
http://autoitx.com/forum.php?mod=viewthread&tid=6100&highlight=%CB%AB%BB%F7%2BListView在WIN7 64位下测试无效! Func WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam)
Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR, $hWndListView, $tInfo, $List
$hWndListView = $ListView1
If Not IsHWnd($ListView2) Then $hWndListView = GUICtrlGetHandle($ListView2)
$tNMHDR = DllStructCreate($tagNMHDR, $ilParam)
$hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom"))
$iIDFrom = DllStructGetData($tNMHDR, "IDFrom")
$iCode = DllStructGetData($tNMHDR, "Code")
Switch $hWndFrom
Case $hWndListView
Switch $iCode
Case $NM_RCLICK
ConsoleWrite("Right click at listview")
;ListView_RClick()
Return 0
Case $NM_CLICK ; 左击
Local $tInfo = DllStructCreate($tagNMITEMACTIVATE, $ilParam)
$Index = DllStructGetData($tInfo, "Index")
$subitemNR = DllStructGetData($tInfo, "SubItem")
ConsoleWrite("Double click at item index: " & $Index & @CRLF)
Case $NM_DBLCLK ; Sent by a list-view control when the user double-clicks an item with the left mouse button
Local $tInfo = DllStructCreate($tagNMITEMACTIVATE, $ilParam)
$Index = DllStructGetData($tInfo, "Index")
$subitemNR = DllStructGetData($tInfo, "SubItem")
ConsoleWrite("Double click at item index: " & $Index & @CRLF)
EndSwitch
EndSwitch
Return $GUI_RUNDEFMSG
EndFunc ;==>WM_NOTIFY这个貌似可以 用原理没研究清楚 楼上的方法是可行,楼主应该是在SciTE中运行脚本时不行,编译后或32位的或把AutoIt3_x64.exe替换成AutoIt3.exe是可以的。
页:
[1]