How to copy Add a pal search result items?

You can talk about VB programming here

How to copy Add a pal search result items?

Postby method » Wed Jan 20, 2010 1:39 pm


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
method
imFiles Master
imFiles Master
 
Posts: 686
Joined: Tue Oct 18, 2005 11:12 am

Re: How to copy Add a pal search result items?

Postby String » Thu Jan 21, 2010 8:47 pm

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.
String
imFiles Senior
imFiles Senior
 
Posts: 282
Joined: Mon Mar 10, 2008 7:06 am

Re: How to copy Add a pal search result items?

Postby method » Fri Jan 22, 2010 3:47 am

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:
Code: Select all
    .ItemCount = SendMessage(lvWindow, LVM_GETITEMCOUNT, 0&, 0&)
      MsgBox "itemcount:" & .ItemCount

[b]Note:lvWindow is same as hwnd of listview[/b]



funcion to get listview hwnd value:
Code: Select all
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 :
Code: Select all
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
method
imFiles Master
imFiles Master
 
Posts: 686
Joined: Tue Oct 18, 2005 11:12 am


Return to Visual Basic Programming

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 0 guests