Skip to content
Home > Programming > Camfrog CTreeViewTS chat member list

Camfrog CTreeViewTS chat member list

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #186393
    brad
    Member

    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.
    #186398
    Mytacism
    Member

    Instead of getting the list of CSplitterCtrlsTS in CF, refer to its real-time counting @ the top of the users list in a room

    #186397
    ChiNa
    Administrator

    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.

    #186396
    James
    Member

    i’m currently working on this. stay tuned. 🙂

    #186395
    James
    Member
    Private Function GetTreeviewHandlesFrom(ByVal hwnd As IntPtr) As List(Of IntPtr)
            TVList.Clear()
            EnumChildWindows(hwnd, AddressOf EnumChildWindowProc, &H0)
            Return TVList
        End Function
    
        Private Function EnumChildWindowProc(ByVal hwnd As IntPtr, ByVal lParam As Integer) As Integer
            Dim cn As New StringBuilder(255)
            GetClassNameW(hwnd, cn, 255)
            If cn.ToString.ToLower.ToLower.Contains("systreeview32") Then 'Make sure the child window is a Treeview before adding its handle to the List
                TVList.Add(hwnd)
            End If
            Return 1
        End Function
    
         _
        Private Shared Function FindWindowW( ByVal lpClassName As String,  ByVal lpWindowName As String) As IntPtr
        End Function
    
         _
        Private Shared Function GetClassNameW(ByVal hWnd As IntPtr,  ByVal lpClassName As System.Text.StringBuilder, ByVal nMaxCount As Integer) As Integer
        End Function
    
        Private Delegate Function EnumCallBackDelegate(ByVal hwnd As IntPtr, ByVal lParam As Integer) As Integer
    
         _
        Private Shared Function EnumChildWindows(ByVal hWndParent As System.IntPtr, ByVal lpEnumFunc As EnumCallBackDelegate, ByVal lParam As Integer) As  Boolean
        End Function
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.