AzKay Posted November 29, 2008 Share Posted November 29, 2008 #include <GUIConstantsEx.au3> #include <ListBoxConstants.au3> #include <TreeViewConstants.au3> #include <WindowsConstants.au3> #Include <GUITreeView.au3> #include <GUIListBox.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 682, 294, 193, 115) $TreeView1 = GUICtrlCreateTreeView(8, 9, 225, 276) GUICtrlCreateTreeViewItem("Test", $TreeView1) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $TreeView1 MsgBox(0, "", "") EndSwitch Sleep(10) WEnd Any way of getting that working? eg; MsgBox() when the treeview is clicked? # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
Zedna Posted November 29, 2008 Share Posted November 29, 2008 expandcollapse popup#include <GUIConstantsEx.au3> #include <ListBoxConstants.au3> #include <TreeViewConstants.au3> #include <WindowsConstants.au3> #Include <GUITreeView.au3> #include <GUIListBox.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 682, 294, 193, 115) $TreeView1 = GUICtrlCreateTreeView(8, 9, 225, 276) GUICtrlCreateTreeViewItem("Test", $TreeView1) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### GUIRegisterMsg($WM_NOTIFY, "WM_Notify_Events") While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func onclick() MsgBox(0, "Info", "Click") EndFunc Func WM_Notify_Events($hWndGUI, $MsgID, $wParam, $lParam) #forceref $hWndGUI, $MsgID, $wParam Local $tagNMHDR, $event If $wParam = $TreeView1 Then $tagNMHDR = DllStructCreate("int;int;int", $lParam) If @error Then Return $event = DllStructGetData($tagNMHDR, 3) If $event = $NM_CLICK Then onclick() EndIf EndFunc Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
AzKay Posted November 29, 2008 Author Share Posted November 29, 2008 Thanks, Though, Thatll call the function whenever anything within the treeview control is clicked. But I guess it cant be helped. # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now