lemony
It`s no heavy
#include <GuiConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GuiListView.au3>
$hGUI = GUICreate("Test GUI", 300, 200)
$hListView = GUICtrlCreateListView("Items|SubItems", 10, 10, 280, 180, $LVS_REPORT, $WS_EX_CLIENTEDGE)
For $i = 1 To 10
_GUICtrlListView_AddItem($hListView, "Item " & $i)
_GUICtrlListView_AddSubItem($hListView, $i - 1, "SubItem " & $i, 1)
Next
GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY")
GUISetState()
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
Func WM_NOTIFY($hWnd, $Msg, $wParam, $lParam)
Local $tNMHDR, $IdFrom, $iCode
$tNMHDR = DllStructCreate($tagNMHDR, $lParam)
$IdFrom = DllStructGetData($tNMHDR, "IdFrom")
$iCode = DllStructGetData($tNMHDR, "Code")
Switch $IdFrom
Case $hListView
Switch $iCode
Case $LVN_ITEMCHANGING
Return 1
EndSwitch
EndSwitch
Return $GUI_RUNDEFMSG
EndFunc ;==>WM_NOTIFY