Opened 15 years ago
Closed 15 years ago
#1432 closed Bug (No Bug)
AutoIt3_x64.exe - GUIRegisterMsg($WM_NOTIFY, "MY_WM_NOTIFY")
Reported by: | mlipok | Owned by: | |
---|---|---|---|
Milestone: | Component: | AutoIt | |
Version: | 3.3.4.0 | Severity: | None |
Keywords: | AutoIt3_x64.exe | Cc: |
Description
AutoIt:3.3.4.0/X64 (Os:WIN_7/X64 Language:0415 Keyboard:00000415 Cpu:X64)
I check example on this site
works very well on
"c:\Program Files (x86)\AutoIt3\AutoIt3.exe"
but had problem on
"c:\Program Files (x86)\AutoIt3\AutoIt3_x64.exe"
here is this scripts
#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GuiTreeView.au3> #include <Array.au3> Global $aData[5] = [4, "Item 1", "Item 2", "Item 3", "Item 4"] Global $aItem_Handles[UBound($aData)] Global $hMain_GUI = GUICreate("TreeView Demo", 500, 500) $hTree = GUICtrlCreateTreeView(10, 10, 480, 480) $hRoot = GUICtrlCreateTreeViewItem("Root", $hTree) For $i = 1 To $aData[0] $aItem_Handles[$i] = GUICtrlGetHandle(GUICtrlCreateTreeViewItem($aData[$i], $hRoot)) Next GUISetState() ; Initialise "DoubleClick on TreeView function" GUIRegisterMsg($WM_NOTIFY, "MY_WM_NOTIFY") Global $fDblClk = False While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch ; Check if tree view double clicked If $fDblClk = True Then $sText = _GUICtrlTreeView_GetText($hTree, _GUICtrlTreeView_GetSelection($hTree)) MsgBox(0, "Hit", "You double clicked on " & $sText ) $fDblClk = False EndIf WEnd Func MY_WM_NOTIFY($hWnd, $Msg, $wParam, $lParam) Switch $wParam Case $hTree Local $tagNMHDR = DllStructCreate("int;int;int", $lParam) If @error Then Return If DllStructGetData($tagNMHDR, 3) = $NM_DBLCLK Then $fDblClk = True EndSwitch $tagNMHDR = 0 EndFunc ;==>MY_WM_NOTIFY
Attachments (0)
Change History (2)
comment:1 Changed 15 years ago by mlipok
comment:2 Changed 15 years ago by Valik
- Resolution set to No Bug
- Status changed from new to closed
Your NMHDR structure declaration is not correct. Use AutoIt's $tagNMHDR to get a correct version. It appears the documentation is wrong for that structure but the structure itself is declared correctly. Your attempt to declare the structure is fine for x86 but is a full 8-bytes too small for x64.
Guidelines for posting comments:
- You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
- In-depth discussions should take place on the forum.
For more information see the full version of the ticket guidelines here.
suplement
after using Aut2exe_x64.exe
this script work fine
problem is only with using AutoIt3_x64.exe