Listview, hands raised?

You can talk about VB programming here

Listview, hands raised?

Postby IMAFriend » Sat Mar 29, 2008 1:38 am


Is there a way to find out who has raised hands?

I can get the list of people, names, the count of names, and the index, but can't seem to pull the ones that have hands up.

Thanks,
DB
IMAFriend
imFiles Newbie
imFiles Newbie
 
Posts: 12
Joined: Sun Mar 02, 2008 4:51 am

Re: Listview, hands raised?

Postby Chike » Sat Mar 29, 2008 5:40 am

Yes, get the image with LVM_GETITEM mask = LVIF_IMAGE, iSubItem = 1, and check the iImage field.
1 = red dot
4 = mic
5 = hand
7 = mute (clock icon, only work in private rooms)

You can check the iImage for cams for iSubItem 0
3 = cam
10 = viewed cam (paltalk scene only)

Note that hand sometimes may cover a mic or red dot, but with this method there is no way to know if it does.

/edit: 3 = cam not 8
Image
Chike
imFiles Master
imFiles Master
 
Posts: 581
Joined: Sun May 13, 2007 6:20 pm

Re: Listview, hands raised?

Postby IMAFriend » Sat Mar 29, 2008 10:25 am

Chike wrote:Yes, get the image with LVM_GETITEM mask = LVIF_IMAGE, iSubItem = 1, and check the iImage field.

You can check the iImage for cams for iSubItem 0


Awesome. This is exactly what I was looking for. Now to see how elegantly I can implement it. Do I have to call that whole procedure 1 time for the nick, and a second time for the subitem 1? That'll give me something to do this morning.

Are there subitems 3, 4, ...?

How can you get this info? The api spy doesn't help much. I looked and looked (maybe not using the right keywords) and couldn't figure out how to extract subitem info, or headerinfo, using api stuff.

Anyway, thanks again for the response.

DougB
IMAFriend
imFiles Newbie
imFiles Newbie
 
Posts: 12
Joined: Sun Mar 02, 2008 4:51 am

Re: Listview, hands raised?

Postby locohacker » Sat Mar 29, 2008 10:56 am

Ah there is a code by galatica for that check it here :)
get-user-status-in-pt-room-vb6-code-source-t5407.html
User avatar
locohacker
Site Admin
Site Admin
 
Posts: 4325
Joined: Fri Dec 31, 2004 6:59 pm

Re: Listview, hands raised?

Postby Chike » Sat Mar 29, 2008 1:14 pm

IMAFriend wrote:Do I have to call that whole procedure 1 time for the nick, and a second time for the subitem 1?

Since they are different sub items, I don't know any other way to do it.
You can still optimize by allocating the external memory in a higher level procedure, or maybe even globally based on the control owning process id.
When I do it this way, I allocate only one block that is big enough for both the LVITEM structure and the text, to save even 2 more calls. The system allocate at memory block size granularity any way, which is 1k i think.

IMAFriend wrote:Are there subitems 3, 4, ...?

No that I know of.

IMAFriend wrote:How can you get this info? The api spy doesn't help much.

I used Winspector Spy to trace messages at the beggining, but later, since my code subclass this control i had the advanrage of being able to trace only the masseges i wanted.
Image
Chike
imFiles Master
imFiles Master
 
Posts: 581
Joined: Sun May 13, 2007 6:20 pm

Re: Listview, hands raised?

Postby method » Thu Jul 17, 2008 12:27 am

Could you guys post a working code ? Thanks
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