I’m stumped. I’ve been trying to get a list of the chatroom members from a Camfrog chatroom for over a week now, to no avail. Any help is appreciated!
”” VB.NET ””
System.Runtime.InteropServices.DllImport("user32.dll", SetLastError:=True, CharSet:=System.Runtime.InteropServices.CharSet.Auto)> Private Shared Function FindWindowEx(ByVal parentHandle As IntPtr, ByVal childAfter As IntPtr, ByVal lclassName As String, ByVal windowTitle As String) As IntPtr End Function Declare Auto Function FindWindow Lib "user32.dll" (ByVal lpClassName As String, ByVal lpWindowName As String) As IntPtr find objects starting with public lobby chatroom. The title may need to be changed to get the first hWnd. Dim hWnd As IntPtr = FindWindow("#32770", "Camfrog: Video Chat Room") ' If hWnd = 0 Then MsgBox("The video chat room does not exist.") End End If Dim hwndObject0 As Long = FindWindowEx(hWnd, IntPtr.Zero, "#32770", "") Dim hwndObject1 As Long = FindWindowEx(hWnd, hwndObject0, "#32770", "") Dim hwndObject2 As Long = FindWindowEx(hWnd, hwndObject1, "#32770", "") Dim hwndObject3 As Long = FindWindowEx(hwndObject2, IntPtr.Zero, "CSplitterCtrlsTS", "") Dim hwndObject4 As Long = FindWindowEx(hwndObject3, IntPtr.Zero, "CSplitterCtrlsTS", "") Dim ListhWnd As Long = FindWindowEx(hwndObject4, IntPtr.Zero, "CTreeViewTS", "") 'Here is the TreeView.
Instead of getting the list of CSplitterCtrlsTS in CF, refer to its real-time counting @ the top of the users list in a room
Your code above is not enough. You need a custom Treeview class or module. I am a bit busy right now to create one. See if you can create your own or find one out there.
i’m currently working on this. stay tuned. 🙂
https://social.msdn.microsoft.com/Forums/vstudio/en-US/35fe9b1a-4602-4ac5-8a41-8e67798d4e7e/how-to-select-an-item-in-a-treeview-clicking-in-the-button-by-hwnd-api?forum=vbgeneral