cGetLVText

This function retrieves the text associated with items of a List View common control. A tab character is inserted between each item's text. If the control has the Report View style, only the text from the first column of each row is returned.

The class name for this control is "SysListView32".

Syntax:

cGetLvText (window-handle)

Parameters:

(i) window-handle Windows handle to a List View common control.

Returns:

(s) list  A tab-delimited list of the text associated with
each item of the list.

 

32-bit Extender

This function is designed for Windows 32-bit application controls. It cannot be used on Windows 64-bit controls.

64-bit Extender

This function is designed for Windows 64-bit application controls. It cannot be used on Windows on 32-bit controls.

 

Example:

AddExtender("wwctl44i.dll",0,"wwctl64i.dll")
Run("Explorer.exe","")
WinWaitExist("Exploring",10)
; Explorer List View area
hwndex = DllHwnd("Exploring")
hwnd = cWndbyclass(hwndex,"SHELLDLL_DefView")
hwnd = cWndbyclass(hwnd,"SysListView32")
myitem = "Windows"
; Get the labels from the first column of each row in the control.
wintext = cGetLvText(hwnd)
;Get the index of the item
select1=ItemLocate(myitem, wintext, @TAB)
If select1
   ; Select the item from the list control.
   If cSetLvItem(hwnd, select1)
      cDblClickItem(hwnd, 0)
   Else
      ; Can't select the item
      Message("Item not selected", "Item number %select1% no longer exists.")
   EndIf
Else
   Message("Item not found", "Item number %select1% may no longer exist.")
EndIf
Exit

See Also:

cSetLvItem, cClearLvItem, cDblClickItem, cWndByClass, cWndinfo, cGetLVColText, DLLhwnd (WIL help).