#include <GUIConstantsEx.au3> #include <GuiListView.au3> #include <WindowsConstants.au3> Opt('MustDeclareVars', 1) Global $hListView Example() Func Example() Local $button, $item1, $item2, $item3, $input1, $msg GUICreate("listview items", 220, 250, 100, 200, -1, $WS_EX_ACCEPTFILES) GUISetBkColor(0x00E0FFFF) ; will change background color $hListView = GUICtrlCreateListView("col1 |col2|col3 ", 10, 10, 200, 150);,$LVS_SORTDESCENDING) $button = GUICtrlCreateButton("Value?", 75, 170, 70, 20) $item1 = GUICtrlCreateListViewItem("item2|col22|col23", $hListView) $item2 = GUICtrlCreateListViewItem("item1|col12|col13", $hListView) $item3 = GUICtrlCreateListViewItem("item3|col32|col33", $hListView) $input1 = GUICtrlCreateInput("", 20, 200, 150) GUICtrlSetState(-1, $GUI_DROPACCEPTED) ; to allow drag and dropping GUIRegisterMsg($WM_NOTIFY, 'WM_NOTIFY') GUISetState() GUICtrlSetData($item2, "ITEM1") GUICtrlSetData($item3, "||COL33") GUICtrlDelete($item1) Do $msg = GUIGetMsg() Select Case $msg = $button MsgBox(0, "listview item", GUICtrlRead(GUICtrlRead($hListView)), 2) Case $msg = $hListView MsgBox(0, "listview", "clicked=" & GUICtrlGetState($hListView), 2) EndSelect Until $msg = $GUI_EVENT_CLOSE EndFunc ;==>Example Func WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam) #forceref $hWnd, $iMsg, $iwParam Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR, $hWndListView, $tInfo ;~ Local $tBuffer $hWndListView = $hListView If Not IsHWnd($hListView) Then $hWndListView = GUICtrlGetHandle($hListView) $tNMHDR = DllStructCreate($tagNMHDR, $ilParam) $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom")) $iIDFrom = DllStructGetData($tNMHDR, "IDFrom") $iCode = DllStructGetData($tNMHDR, "Code") Switch $hWndFrom Case $hWndListView Switch $iCode ;~ Case $LVN_BEGINDRAG ; A drag-and-drop operation involving the left mouse button is being initiated ;~ $tInfo = DllStructCreate($tagNMLISTVIEW, $ilParam) ;~ _DebugPrint("$LVN_BEGINDRAG" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _ ;~ "-->IDFrom:" & @TAB & $iIDFrom & @LF & _ ;~ "-->Code:" & @TAB & $iCode & @LF & _ ;~ "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @LF & _ ;~ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @LF & _ ;~ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @LF & _ ;~ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @LF & _ ;~ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @LF & _ ;~ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @LF & _ ;~ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @LF & _ ;~ "-->Param:" & @TAB & DllStructGetData($tInfo, "Param")) ;~ ; No return value ;~ Case $LVN_BEGINLABELEDIT ; Start of label editing for an item ;~ $tInfo = DllStructCreate($tagNMLVDISPINFO, $ilParam) ;~ _DebugPrint("$LVN_BEGINLABELEDIT" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _ ;~ "-->IDFrom:" & @TAB & $iIDFrom & @LF & _ ;~ "-->Code:" & @TAB & $iCode & @LF & _ ;~ "-->Mask:" & @TAB & DllStructGetData($tInfo, "Mask") & @LF & _ ;~ "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @LF & _ ;~ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @LF & _ ;~ "-->State:" & @TAB & DllStructGetData($tInfo, "State") & @LF & _ ;~ "-->StateMask:" & @TAB & DllStructGetData($tInfo, "StateMask") & @LF & _ ;~ "-->Image:" & @TAB & DllStructGetData($tInfo, "Image") & @LF & _ ;~ "-->Param:" & @TAB & DllStructGetData($tInfo, "Param") & @LF & _ ;~ "-->Indent:" & @TAB & DllStructGetData($tInfo, "Indent") & @LF & _ ;~ "-->GroupID:" & @TAB & DllStructGetData($tInfo, "GroupID") & @LF & _ ;~ "-->Columns:" & @TAB & DllStructGetData($tInfo, "Columns") & @LF & _ ;~ "-->pColumns:" & @TAB & DllStructGetData($tInfo, "pColumns")) ;~ Return False ; Allow the user to edit the label ;~ ;Return True ; Prevent the user from editing the label ;~ Case $LVN_BEGINRDRAG ; A drag-and-drop operation involving the right mouse button is being initiated ;~ $tInfo = DllStructCreate($tagNMLISTVIEW, $ilParam) ;~ _DebugPrint("$LVN_BEGINRDRAG" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _ ;~ "-->IDFrom:" & @TAB & $iIDFrom & @LF & _ ;~ "-->Code:" & @TAB & $iCode & @LF & _ ;~ "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @LF & _ ;~ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @LF & _ ;~ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @LF & _ ;~ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @LF & _ ;~ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @LF & _ ;~ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @LF & _ ;~ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @LF & _ ;~ "-->Param:" & @TAB & DllStructGetData($tInfo, "Param")) ;~ ; No return value ;~ Case $LVN_BEGINSCROLL ; A scrolling operation starts, Minium OS WinXP ;~ $tInfo = DllStructCreate($tagNMLVSCROLL, $ilParam) ;~ _DebugPrint("$LVN_BEGINSCROLL" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _ ;~ "-->IDFrom:" & @TAB & $iIDFrom & @LF & _ ;~ "-->Code:" & @TAB & $iCode & @LF & _ ;~ "-->DX:" & @TAB & DllStructGetData($tInfo, "DX") & @LF & _ ;~ "-->DY:" & @TAB & DllStructGetData($tInfo, "DY")) ;~ ; No return value Case $LVN_COLUMNCLICK ; A column was clicked $tInfo = DllStructCreate($tagNMLISTVIEW, $ilParam) _DebugPrint("$LVN_COLUMNCLICK" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _ "-->IDFrom:" & @TAB & $iIDFrom & @LF & _ "-->Code:" & @TAB & $iCode & @LF & _ "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @LF & _ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @LF & _ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @LF & _ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @LF & _ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @LF & _ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @LF & _ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @LF & _ "-->Param:" & @TAB & DllStructGetData($tInfo, "Param")) ; No return value ;~ Case $LVN_DELETEALLITEMS ; All items in the control are about to be deleted ;~ $tInfo = DllStructCreate($tagNMLISTVIEW, $ilParam) ;~ _DebugPrint("$LVN_DELETEALLITEMS" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _ ;~ "-->IDFrom:" & @TAB & $iIDFrom & @LF & _ ;~ "-->Code:" & @TAB & $iCode & @LF & _ ;~ "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @LF & _ ;~ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @LF & _ ;~ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @LF & _ ;~ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @LF & _ ;~ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @LF & _ ;~ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @LF & _ ;~ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @LF & _ ;~ "-->Param:" & @TAB & DllStructGetData($tInfo, "Param")) ;~ Return True ; To suppress subsequent $LVN_DELETEITEM messages ;~ ;Return False ; To receive subsequent $LVN_DELETEITEM messages ;~ Case $LVN_DELETEITEM ; An item is about to be deleted ;~ $tInfo = DllStructCreate($tagNMLISTVIEW, $ilParam) ;~ _DebugPrint("$LVN_DELETEITEM" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _ ;~ "-->IDFrom:" & @TAB & $iIDFrom & @LF & _ ;~ "-->Code:" & @TAB & $iCode & @LF & _ ;~ "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @LF & _ ;~ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @LF & _ ;~ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @LF & _ ;~ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @LF & _ ;~ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @LF & _ ;~ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @LF & _ ;~ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @LF & _ ;~ "-->Param:" & @TAB & DllStructGetData($tInfo, "Param")) ;~ ; No return value ;~ Case $LVN_ENDLABELEDIT ; The end of label editing for an item ;~ $tInfo = DllStructCreate($tagNMLVDISPINFO, $ilParam) ;~ $tBuffer = DllStructCreate("char Text[" & DllStructGetData($tInfo, "TextMax") & "]", DllStructGetData($tInfo, "Text")) ;~ _DebugPrint("$LVN_ENDLABELEDIT" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _ ;~ "-->IDFrom:" & @TAB & $iIDFrom & @LF & _ ;~ "-->Code:" & @TAB & $iCode & @LF & _ ;~ "-->Mask:" & @TAB & DllStructGetData($tInfo, "Mask") & @LF & _ ;~ "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @LF & _ ;~ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @LF & _ ;~ "-->State:" & @TAB & DllStructGetData($tInfo, "State") & @LF & _ ;~ "-->StateMask:" & @TAB & DllStructGetData($tInfo, "StateMask") & @LF & _ ;~ "-->Text:" & @TAB & DllStructGetData($tBuffer, "Text") & @LF & _ ;~ "-->TextMax:" & @TAB & DllStructGetData($tInfo, "TextMax") & @LF & _ ;~ "-->Image:" & @TAB & DllStructGetData($tInfo, "Image") & @LF & _ ;~ "-->Param:" & @TAB & DllStructGetData($tInfo, "Param") & @LF & _ ;~ "-->Indent:" & @TAB & DllStructGetData($tInfo, "Indent") & @LF & _ ;~ "-->GroupID:" & @TAB & DllStructGetData($tInfo, "GroupID") & @LF & _ ;~ "-->Columns:" & @TAB & DllStructGetData($tInfo, "Columns") & @LF & _ ;~ "-->pColumns:" & @TAB & DllStructGetData($tInfo, "pColumns")) ;~ ; If Text is not empty, return True to set the item's label to the edited text, return false to reject it ;~ ; If Text is empty the return value is ignored ;~ Return True ;~ Case $LVN_ENDSCROLL ; A scrolling operation ends, Minium OS WinXP ;~ $tInfo = DllStructCreate($tagNMLVSCROLL, $ilParam) ;~ _DebugPrint("$LVN_ENDSCROLL" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _ ;~ "-->IDFrom:" & @TAB & $iIDFrom & @LF & _ ;~ "-->Code:" & @TAB & $iCode & @LF & _ ;~ "-->DX:" & @TAB & DllStructGetData($tInfo, "DX") & @LF & _ ;~ "-->DY:" & @TAB & DllStructGetData($tInfo, "DY")) ;~ ; No return value ;~ Case $LVN_GETDISPINFO ; Provide information needed to display or sort a list-view item ;~ $tInfo = DllStructCreate($tagNMLVDISPINFO, $ilParam) ;~ $tBuffer = DllStructCreate("char Text[" & DllStructGetData($tInfo, "TextMax") & "]", DllStructGetData($tInfo, "Text")) ;~ _DebugPrint("$LVN_GETDISPINFO" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _ ;~ "-->IDFrom:" & @TAB & $iIDFrom & @LF & _ ;~ "-->Code:" & @TAB & $iCode & @LF & _ ;~ "-->Mask:" & @TAB & DllStructGetData($tInfo, "Mask") & @LF & _ ;~ "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @LF & _ ;~ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @LF & _ ;~ "-->State:" & @TAB & DllStructGetData($tInfo, "State") & @LF & _ ;~ "-->StateMask:" & @TAB & DllStructGetData($tInfo, "StateMask") & @LF & _ ;~ "-->Text:" & @TAB & DllStructGetData($tBuffer, "Text") & @LF & _ ;~ "-->TextMax:" & @TAB & DllStructGetData($tInfo, "TextMax") & @LF & _ ;~ "-->Image:" & @TAB & DllStructGetData($tInfo, "Image") & @LF & _ ;~ "-->Param:" & @TAB & DllStructGetData($tInfo, "Param") & @LF & _ ;~ "-->Indent:" & @TAB & DllStructGetData($tInfo, "Indent") & @LF & _ ;~ "-->GroupID:" & @TAB & DllStructGetData($tInfo, "GroupID") & @LF & _ ;~ "-->Columns:" & @TAB & DllStructGetData($tInfo, "Columns") & @LF & _ ;~ "-->pColumns:" & @TAB & DllStructGetData($tInfo, "pColumns")) ;~ ; No return value ;~ Case $LVN_GETINFOTIP ; Sent by a large icon view list-view control that has the $LVS_EX_INFOTIP extended style ;~ $tInfo = DllStructCreate($tagNMLVGETINFOTIP, $ilParam) ;~ $tBuffer = DllStructCreate("char Text[" & DllStructGetData($tInfo, "TextMax") & "]", DllStructGetData($tInfo, "Text")) ;~ _DebugPrint("$LVN_GETINFOTIP" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _ ;~ "-->IDFrom:" & @TAB & $iIDFrom & @LF & _ ;~ "-->Code:" & @TAB & $iCode & @LF & _ ;~ "-->Flags:" & @TAB & DllStructGetData($tInfo, "Flags") & @LF & _ ;~ "-->Text:" & @TAB & DllStructGetData($tBuffer, "Text") & @LF & _ ;~ "-->TextMax:" & @TAB & DllStructGetData($tInfo, "TextMax") & @LF & _ ;~ "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @LF & _ ;~ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @LF & _ ;~ "-->lParam:" & @TAB & DllStructGetData($tInfo, "lParam")) ;~ ; No return value ;~ Case $LVN_HOTTRACK ; Sent by a list-view control when the user moves the mouse over an item ;~ $tInfo = DllStructCreate($tagNMLISTVIEW, $ilParam) ;~ _DebugPrint("$LVN_HOTTRACK" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _ ;~ "-->IDFrom:" & @TAB & $iIDFrom & @LF & _ ;~ "-->Code:" & @TAB & $iCode & @LF & _ ;~ "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @LF & _ ;~ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @LF & _ ;~ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @LF & _ ;~ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @LF & _ ;~ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @LF & _ ;~ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @LF & _ ;~ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @LF & _ ;~ "-->Param:" & @TAB & DllStructGetData($tInfo, "Param")) ;~ Return 0 ; allow the list view to perform its normal track select processing. ;~ ;Return 1 ; the item will not be selected. ;~ Case $LVN_INSERTITEM ; A new item was inserted ;~ $tInfo = DllStructCreate($tagNMLISTVIEW, $ilParam) ;~ _DebugPrint("$LVN_INSERTITEM" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _ ;~ "-->IDFrom:" & @TAB & $iIDFrom & @LF & _ ;~ "-->Code:" & @TAB & $iCode & @LF & _ ;~ "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @LF & _ ;~ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @LF & _ ;~ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @LF & _ ;~ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @LF & _ ;~ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @LF & _ ;~ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @LF & _ ;~ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @LF & _ ;~ "-->Param:" & @TAB & DllStructGetData($tInfo, "Param")) ;~ ; No return value ;~ Case $LVN_ITEMACTIVATE ; Sent by a list-view control when the user activates an item ;~ $tInfo = DllStructCreate($tagNMITEMACTIVATE, $ilParam) ;~ _DebugPrint("$LVN_ITEMACTIVATE" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _ ;~ "-->IDFrom:" & @TAB & $iIDFrom & @LF & _ ;~ "-->Code:" & @TAB & $iCode & @LF & _ ;~ "-->Index:" & @TAB & DllStructGetData($tInfo, "Index") & @LF & _ ;~ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @LF & _ ;~ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @LF & _ ;~ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @LF & _ ;~ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @LF & _ ;~ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @LF & _ ;~ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @LF & _ ;~ "-->lParam:" & @TAB & DllStructGetData($tInfo, "lParam") & @LF & _ ;~ "-->KeyFlags:" & @TAB & DllStructGetData($tInfo, "KeyFlags")) ;~ Return 0 ;~ Case $LVN_ITEMCHANGED ; An item has changed ;~ $tInfo = DllStructCreate($tagNMLISTVIEW, $ilParam) ;~ _DebugPrint("$LVN_ITEMCHANGED" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _ ;~ "-->IDFrom:" & @TAB & $iIDFrom & @LF & _ ;~ "-->Code:" & @TAB & $iCode & @LF & _ ;~ "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @LF & _ ;~ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @LF & _ ;~ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @LF & _ ;~ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @LF & _ ;~ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @LF & _ ;~ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @LF & _ ;~ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @LF & _ ;~ "-->Param:" & @TAB & DllStructGetData($tInfo, "Param")) ;~ ; No return value ;~ Case $LVN_ITEMCHANGING ; An item is changing ;~ $tInfo = DllStructCreate($tagNMLISTVIEW, $ilParam) ;~ _DebugPrint("$LVN_ITEMCHANGING" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _ ;~ "-->IDFrom:" & @TAB & $iIDFrom & @LF & _ ;~ "-->Code:" & @TAB & $iCode & @LF & _ ;~ "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @LF & _ ;~ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @LF & _ ;~ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @LF & _ ;~ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @LF & _ ;~ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @LF & _ ;~ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @LF & _ ;~ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @LF & _ ;~ "-->Param:" & @TAB & DllStructGetData($tInfo, "Param")) ;~ Return True ; prevent the change ;~ ;Return False ; allow the change Case $LVN_KEYDOWN ; A key has been pressed $tInfo = DllStructCreate($tagNMLVKEYDOWN, $ilParam) _DebugPrint("$LVN_KEYDOWN" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _ "-->IDFrom:" & @TAB & $iIDFrom & @LF & _ "-->Code:" & @TAB & $iCode & @LF & _ "-->VKey:" & @TAB & DllStructGetData($tInfo, "VKey") & @LF & _ "-->Flags:" & @TAB & DllStructGetData($tInfo, "Flags")) ; No return value ;~ Case $LVN_MARQUEEBEGIN ; A bounding box (marquee) selection has begun ;~ _DebugPrint("$LVN_MARQUEEBEGIN" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _ ;~ "-->IDFrom:" & @TAB & $iIDFrom & @LF & _ ;~ "-->Code:" & @TAB & $iCode) ;~ Return 0 ; accept the message ;~ ;Return 1 ; quit the bounding box selection ;~ Case $LVN_SETDISPINFO ; Update the information it maintains for an item ;~ $tInfo = DllStructCreate($tagNMLVDISPINFO, $ilParam) ;~ $tBuffer = DllStructCreate("char Text[" & DllStructGetData($tInfo, "TextMax") & "]", DllStructGetData($tInfo, "Text")) ;~ _DebugPrint("$LVN_SETDISPINFO" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _ ;~ "-->IDFrom:" & @TAB & $iIDFrom & @LF & _ ;~ "-->Code:" & @TAB & $iCode & @LF & _ ;~ "-->Mask:" & @TAB & DllStructGetData($tInfo, "Mask") & @LF & _ ;~ "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @LF & _ ;~ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @LF & _ ;~ "-->State:" & @TAB & DllStructGetData($tInfo, "State") & @LF & _ ;~ "-->StateMask:" & @TAB & DllStructGetData($tInfo, "StateMask") & @LF & _ ;~ "-->Text:" & @TAB & DllStructGetData($tBuffer, "Text") & @LF & _ ;~ "-->TextMax:" & @TAB & DllStructGetData($tInfo, "TextMax") & @LF & _ ;~ "-->Image:" & @TAB & DllStructGetData($tInfo, "Image") & @LF & _ ;~ "-->Param:" & @TAB & DllStructGetData($tInfo, "Param") & @LF & _ ;~ "-->Indent:" & @TAB & DllStructGetData($tInfo, "Indent") & @LF & _ ;~ "-->GroupID:" & @TAB & DllStructGetData($tInfo, "GroupID") & @LF & _ ;~ "-->Columns:" & @TAB & DllStructGetData($tInfo, "Columns") & @LF & _ ;~ "-->pColumns:" & @TAB & DllStructGetData($tInfo, "pColumns")) ;~ ; No return value Case $NM_CLICK ; Sent by a list-view control when the user clicks an item with the left mouse button $tInfo = DllStructCreate($tagNMITEMACTIVATE, $ilParam) ToolTip('Handel ListView: ' & $hListView, 10, 100, 'ListView получил фокус') _DebugPrint("$NM_CLICK" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _ "-->IDFrom:" & @TAB & $iIDFrom & @LF & _ "-->Code:" & @TAB & $iCode & @LF & _ "-->Index:" & @TAB & DllStructGetData($tInfo, "Index") & @LF & _ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @LF & _ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @LF & _ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @LF & _ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @LF & _ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @LF & _ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @LF & _ "-->lParam:" & @TAB & DllStructGetData($tInfo, "lParam") & @LF & _ "-->KeyFlags:" & @TAB & DllStructGetData($tInfo, "KeyFlags")) ; No return value Case $NM_DBLCLK ; Sent by a list-view control when the user double-clicks an item with the left mouse button $tInfo = DllStructCreate($tagNMITEMACTIVATE, $ilParam) _DebugPrint("$NM_DBLCLK" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _ "-->IDFrom:" & @TAB & $iIDFrom & @LF & _ "-->Code:" & @TAB & $iCode & @LF & _ "-->Index:" & @TAB & DllStructGetData($tInfo, "Index") & @LF & _ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @LF & _ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @LF & _ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @LF & _ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @LF & _ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @LF & _ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @LF & _ "-->lParam:" & @TAB & DllStructGetData($tInfo, "lParam") & @LF & _ "-->KeyFlags:" & @TAB & DllStructGetData($tInfo, "KeyFlags")) ; No return value ;~ Case $NM_HOVER ; Sent by a list-view control when the mouse hovers over an item ;~ _DebugPrint("$NM_HOVER" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _ ;~ "-->IDFrom:" & @TAB & $iIDFrom & @LF & _ ;~ "-->Code:" & @TAB & $iCode) ;~ Return 0 ; process the hover normally ;~ ;Return 1 ; prevent the hover from being processed Case $NM_KILLFOCUS ; The control has lost the input focus ToolTip(' ', 10, 100, 'ListView утратил фокус') _DebugPrint("$NM_KILLFOCUS" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _ "-->IDFrom:" & @TAB & $iIDFrom & @LF & _ "-->Code:" & @TAB & $iCode) ; No return value Case $NM_RCLICK ; Sent by a list-view control when the user clicks an item with the right mouse button $tInfo = DllStructCreate($tagNMITEMACTIVATE, $ilParam) _DebugPrint("$NM_RCLICK" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _ "-->IDFrom:" & @TAB & $iIDFrom & @LF & _ "-->Code:" & @TAB & $iCode & @LF & _ "-->Index:" & @TAB & DllStructGetData($tInfo, "Index") & @LF & _ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @LF & _ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @LF & _ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @LF & _ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @LF & _ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @LF & _ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @LF & _ "-->lParam:" & @TAB & DllStructGetData($tInfo, "lParam") & @LF & _ "-->KeyFlags:" & @TAB & DllStructGetData($tInfo, "KeyFlags")) |