Skip to content

Select Nick On Paltalk Listview Code FInally :)

Viewing 15 posts - 61 through 75 (of 94 total)
  • Author
    Posts
  • #188678
    method
    Member

    is this the whole code ? in vb6 it is dam long!! could u just upload the it as project. I will work on it 😆 😆

    #188677

    just copy and past that code to button click procedure. if you are coding in mfc u see i’am setting “character set” to Use Multi-Byte Character Set not unicode, if your setting character set is unicode it will not compile that code.

    #188676
    method
    Member

    @nanomachine007 wrote:

    just copy and past that code to button click procedure. if you are coding in mfc u see i’am setting “character set” to Use Multi-Byte Character Set not unicode, if your setting character set is unicode it will not compile that code.

    I will work on it . when solved i will let u know 🙂

    #188675

    I solved problem man here is the code highligth item for pt

    HWND listview=NULL; // List View identifier
    HWND parent,child;
    parent=NULL;
    child=NULL;
    parent = ::FindWindow("My Window Class",NULL);
    
    child =::FindWindowEx(parent,0,"WTL_SplitterWindow",NULL);
    child =::FindWindowEx(child,0,"WTL_SplitterWindow",NULL);
    child =::FindWindowEx(child,0,"WTL_SplitterWindow",NULL);
    child =::FindWindowEx(child,0,"ATL:0053C8D0",NULL);
    listview=::FindWindowEx(child,0,"SysListView32",NULL);
    
    LVITEM lvi, *_lvi;
    unsigned long pid;
    HANDLE process;
    
    GetWindowThreadProcessId(listview, &pid);
    process=OpenProcess(PROCESS_VM_OPERATION | PROCESS_VM_READ | PROCESS_VM_WRITE, FALSE, pid);
    if(process)
    {
    
    _lvi=(LVITEM*)VirtualAllocEx(process, NULL, sizeof(LVITEM), MEM_RESERVE|MEM_COMMIT, PAGE_READWRITE);
    lvi.mask = LVIF_STATE;
    lvi.state =15;
    lvi.stateMask = LVIS_SELECTED | LVIS_FOCUSED;
    
    WriteProcessMemory(process, _lvi, &lvi, sizeof(LVITEM), NULL);
    ::SendMessage(listview, LVM_SETITEMSTATE, (WPARAM)0, (LPARAM)_lvi);
    VirtualFreeEx(process, _lvi, 0, MEM_RELEASE);
    }
    ::CloseHandle(process);

     

    in that example it will highligth the first nick but u can change to whatever position you want the third param of sendmessage 8)

    #188674
    method
    Member

    Nano . Excelet job. Thanks alot . MAn could u modify the code so we could search by name too just like the other project that u enter a name of user it goes find it and higlight it. THat makes this program usefull for the projects that we work on. Also could add an option to deselect item too.

    Furthermore, nano are u good at customDraw ? what i mean being able to change color of nicks in listview in our own pc? i do not mean all nicks , just the ones we highlight and press a button. looking forward for u reply.Thanks

    #188673

    LOL you did not see my other post about color nick ❓ ❓ ❓ a hint to do that just tell that window do not redraw all item than you can change difrent color for different nick.

    U have to wait if you want i do a code highligth pal nick by giving their nick in textbox. I have coded in mfc how to get external item. if you want i can pm you for that code. and with this snippet about highligth nick i think you dont need i do it for you 8)

    #188672
    method
    Member

    @nanomachine007 wrote:

    LOL you did not see my other post about color nick ❓ ❓ ❓ a hint to do that just tell that window do not redraw all item than you can change difrent color for different nick.

    U have to wait if you want i do a code highligth pal nick by giving their nick in textbox. I have coded in mfc how to get external item. if you want i can pm you for that code. and with this snippet about highligth nick i think you dont need i do it for you 8)

    could u tell me what post u talked about color ? i realy want to know this. I already know how to color them all but that is not what i want. I want to be able to color individual names rather then the whole listview. So i be happy if u show me how.

    Man that would be nice u send me that code for getting names from externial listview in MFC and also if can modify u code so we can highlight by typing usrer name. I like mfc i want to learn more.Looking forward for u reply.Thanks

    #188671

    ok finally i decided it can go public, here is hignligth nick by giving nick in text box mfc version 😆

    #188670
    method
    Member

    @nanomachine007 wrote:

    ok finally i decided it can go public, here is hignligth nick by giving nick in text box mfc version 😆

    man thank u for uploading this but i can not use it since i am in visual stuido 6. could u upload one for visual studio 6 version too.Thanks

    #188669

    I did not have visual studio 2003, i just have visual studio 2005.

    #188668
    method
    Member

    @nanomachine007 wrote:

    I did not have visual studio 2003, i just have visual studio 2005.

    🙁 so there is no way i can use i then :-(( very sad

    if u can not convert it . could u just upload an exe one so i test it.Thanks

    #188667

    i can post the snippet of the code the get nick. btw have you try my previous snippet about highlight

    int GetPosByNick(CString szNick)
    {
    
    HWND hList=NULL; // List View identifier
    
    HWND parent,child;
    parent=NULL;
    child=NULL;
    parent = ::FindWindow("My Window Class",NULL);
    CString c;
    
    child =::FindWindowEx(parent,0,"WTL_SplitterWindow",NULL);
    child =::FindWindowEx(child,0,"WTL_SplitterWindow",NULL);
    child =::FindWindowEx(child,0,"WTL_SplitterWindow",NULL);
    child =::FindWindowEx(child,0,"ATL:0053C8D0",NULL);
    hList=::FindWindowEx(child,0,"SysListView32",NULL);
    
    HWND hwnd=parent;
    HWND listview=hList;
    
    int count=(int)::SendMessage(listview, LVM_GETITEMCOUNT, 0, 0);
    int i;
    
    LVITEM lvi, *_lvi;
    char item[512];
    char *_item;
    unsigned long pid;
    HANDLE process;
    
    GetWindowThreadProcessId(listview, &pid);
    process=OpenProcess(PROCESS_VM_OPERATION|PROCESS_VM_READ|PROCESS_VM_WRITE|PROCESS_QUERY_INFORMATION, FALSE, pid);
    
    _lvi=(LVITEM*)VirtualAllocEx(process, NULL, sizeof(LVITEM), MEM_COMMIT, PAGE_READWRITE);
    
    _item=(char*)VirtualAllocEx(process, NULL, 512, MEM_COMMIT, PAGE_READWRITE);
    
    lvi.cchTextMax=512;
    
    for(i=0; i<count; i++)="" {="" lvi.isubitem="2;" lvi.psztext="_item;" writeprocessmemory(process,="" _lvi,="" &lvi,="" sizeof(lvitem),="" null);="" ::sendmessage(listview,="" lvm_getitemtext,="" (wparam)i,="" (lparam)_lvi);="" readprocessmemory(process,="" _item,="" item,="" 512,="" _subitem,="" subitem,="" if(item="=szNick)" virtualfreeex(process,="" 0,="" mem_release);="" ::closehandle(process);="" return="" i;="" }="" -1;="" }<="" pre="">

    give a nick to parameter and it will return position of that nick and use my other code to do highlight

    #188666
    method
    Member

    Thanks man . i tried your previouse code it highlights name giving it the postion . I do not know how to run your current code ! could u tell me how to run it ? what controle and buttons do i need?

    Furthermore , how to combine these 2?
    could u tell me how i run it alone and combine it with previouse one.Thanks

    #188665

    example

    int pos=-1;
    pos=GetPosByNick(“yournick”);
    now you get the position of yournick

    if it return -1 that mean the nick passed by parameter does not exist in room.

    and declare that function like this in global

    int GetPosByNick(CString szNick);
    after copy my snippet right here

    vb6 is more simple why you want to go with mfc for pt progg.

    #188664
    method
    Member

    @nanomachine007 wrote:

    example

    int pos=-1;
    pos=GetPosByNick(“yournick”);
    now you get the position of yournick

    if it return -1 that mean the nick passed by parameter does not exist in room.

    and declare that function like this in global

    int GetPosByNick(CString szNick);
    after copy my snippet right here

    vb6 is more simple why you want to go with mfc for pt progg.

    Man could u help me out make this work in visual studio 6. Just tell me what button and controles i need and where to use your code to be able to highlight the user by name.Thanks

Viewing 15 posts - 61 through 75 (of 94 total)
  • You must be logged in to reply to this topic.