Aceguy Posted March 14, 2008 Posted March 14, 2008 wouldl like to return the column sleceted in a listview. please help [u]My Projects.[/u]Launcher - not just for games & Apps (Mp3's & Network Files)Mp3 File RenamerMy File Backup UtilityFFXI - Realtime to Vana time Clock
rasim Posted March 14, 2008 Posted March 14, 2008 (edited) wouldl like to return the column sleceted in a listview. please helpexpandcollapse popup#include <GuiListView.au3> #include <GuiConstantsEx.au3> $Gui = GUICreate("Test", 320, 220) $hListView = _GUICtrlListView_Create($GUI, "Items|SubItems1|SubItems2", 10, 10, 300, 200, BitOR($LVS_EDITLABELS, $LVS_REPORT), $WS_EX_CLIENTEDGE) _GUICtrlListView_SetExtendedListViewStyle($hListView, BitOR($LVS_EX_SUBITEMIMAGES, $LVS_EX_FULLROWSELECT)) _GUICtrlListView_SetColumnWidth($hListView, 0, 98) _GUICtrlListView_SetColumnWidth($hListView, 1, 98) _GUICtrlListView_SetColumnWidth($hListView, 2, 98) GUISetState() GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd Func WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam) Local $hWndFrom, $iCode, $tNMHDR, $hWndListView, $tInfo, $iColumnIndex $hWndListView = $hListView If Not IsHWnd($hListView) Then $hWndListView = GUICtrlGetHandle($hListView) $tNMHDR = DllStructCreate($tagNMHDR, $ilParam) $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom")) $iCode = DllStructGetData($tNMHDR, "Code") Switch $hWndFrom Case $hWndListView Switch $iCode Case $LVN_COLUMNCLICK $tInfo = DllStructCreate($tagNMLISTVIEW, $ilParam) $iColumnIndex = DllStructGetData($tInfo, "SubItem") MsgBox(0, "Msg", $iColumnIndex & " column clicked") EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc Edited March 14, 2008 by rasim
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