Skip to content

How to copy Add a pal search result items?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #187282
    method
    Member

    Hi all .I wonder how i can copy all the items from “Add a Pal” search result? Is it a listbox or listview ?can i use the same code the copies room user names ? I be happy if some one show me how this can be doen.Thanks

    #187284
    String
    Member

    Yeah, its a listview. With a few mods, I was able to use the same technique used to get room list to retrieve this list as well.

    #187283
    method
    Member

    Thanks string for your reply. I used the following function to get listview hwnd but unfortunelty when i use that hwnd value to count the listview items i get zero. Could you tell me what i am doing wrong to get the number of liste view itemes?
    Looking forward for your reply.Thanks

    code to count the listview items:

    .ItemCount = SendMessage(lvWindow, LVM_GETITEMCOUNT, 0&, 0&)
    MsgBox "itemcount:" & .ItemCount
    
    Note:lvWindow is same as hwnd of listview

     

    funcion to get listview hwnd value:

    Function getNickListHwnd2() As Long
    'Variables
    'Dim mywindowclass As Long, wtlsplitterwindow As Long, atldd As Long
    Dim syslistview As Long
    
    Dim atlc As Long, atlcf As Long, atla As Long
    
    atlc = FindWindow("#32770", "Add a pal")
    syslistview = FindWindowEx(atlc, 0&, "SysListView32", vbNullString)
    
    MsgBox syslistview
    getNickListHwnd2 = syslistview
    End Function

     

    room list code to get hWnd :

    Private Sub Command1_Click()
    
    Dim dlggroupchatwindowclass As Long, wtlsplitterwindow As Long, cwndmembertree As Long
    'Dim syslistview As Long
    dlggroupchatwindowclass = FindWindow("dlggroupchat window class", vbNullString)
    wtlsplitterwindow = FindWindowEx(dlggroupchatwindowclass, 0&, "wtl_splitterwindow", vbNullString)
    wtlsplitterwindow = FindWindowEx(wtlsplitterwindow, 0&, "wtl_splitterwindow", vbNullString)
    wtlsplitterwindow = FindWindowEx(wtlsplitterwindow, 0&, "wtl_splitterwindow", vbNullString)
    wtlsplitterwindow = FindWindowEx(wtlsplitterwindow, 0&, "wtl_splitterwindow", vbNullString)
    wtlsplitterwindow = FindWindowEx(wtlsplitterwindow, 0&, "wtl_splitterwindow", vbNullString)
    cwndmembertree = FindWindowEx(wtlsplitterwindow, 0&, "cwndmembertree", vbNullString)
    syslistview = FindWindowEx(cwndmembertree, 0&, "syslistview32", vbNullString)
    
    MsgBox syslistview
    
    Call GetListviewItem(syslistview)
    End Sub

     

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.