Getting items from SysListView32 using ContentViewWalker
The whole day i was searching to read the SysListView32 items with classic ways, using LVM_Getitem etc.
Then I found this way.
This ContentViewWalker is really new to me. I want to read the whole subitems in the listview.
I can read only the first item of each line at listview.I talked alot. Heres my code:
For Each item As Process In Process.GetProcessesByName("GlobalManager")
hWindow = GetDlgItem(item.MainWindowHandle, 256)
Next
Dim el As AutomationElement = AutomationElement.FromHandle(hWindow)
Dim walker As TreeWalker = TreeWalker.ControlViewWalker
Dim i As Integer = 0
Dim child As AutomationElement = walker.GetFirstChild(el)
While child IsNot Nothing
ListBox1.Items.Add(String.Format("item {0} is a ""{1}"" with name ""{2}""", System.Math.Max(System.Threading.Interlocked.Increment(i), i - 1), child.Current.LocalizedControlType, child.Current.Name))
child= walker.GetNextSibling(child)
End While
How do i pass over the next subitem ??
Thanks in advance , sarkolata