#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <TreeViewConstants.au3>
#include <StaticConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 615, 438, 192, 124)
$TreeView = GUICtrlCreateTreeView(96, 80, 169, 161, BitOR($GUI_SS_DEFAULT_TREEVIEW, $TVS_CHECKBOXES, $TVS_SINGLEEXPAND, $TVS_INFOTIP, $TVS_FULLROWSELECT, $TVS_NOSCROLL, $WS_HSCROLL, $WS_VSCROLL, $WS_BORDER, $WS_CLIPSIBLINGS), BitOR($WS_EX_CLIENTEDGE, $WS_EX_STATICEDGE))
$item = GUICtrlCreateTreeViewItem("first", $TreeView)
GUISetState()
While 1
$msg = GUIGetMsg()
Select
Case BitAND(GUICtrlRead($item), $GUI_CHECKED)
MsgBox(0, 0, "event first is occur")
ExitLoop
Case $msg = $GUI_EVENT_CLOSE
Exit
EndSelect
WEnd |