Skip to content

Listview, hands raised?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #187593
    IMAFriend
    Member

    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

    #187598
    Chike
    Member

    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

    #187597
    IMAFriend
    Member

    @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

    #187596
    Admin
    Administrator

    Ah there is a code by galatica for that check it here 🙂
    get-user-status-in-pt-room-vb6-code-source-t5407.html

    #187595
    Chike
    Member

    @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.

    #187594
    method
    Member

    Could you guys post a working code ? Thanks

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