- This topic has 13 replies, 4 voices, and was last updated 15 years ago by String.
-
AuthorPosts
-
April 1, 2009 at 10:49 am #187382methodMember
Hi all .Could any one point me to the source code that only reads user names when user enter the room . I am sure the code was part of one of bigger project here but i cant find it. I am looking for a code that is effective in busy rooms where the texts scroll rapidly.
April 1, 2009 at 7:59 pm #187395StringMemberYou might find an example in this source..
April 1, 2009 at 8:54 pm #187394ChikeMemberSubclassing the control makes it easy
LRESULT APIENTRY UserListProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { WNDPROC wndprocPrev = get_prev_wndproc(hwnd); switch (uMsg) { case LVM_DELETEITEM: break; case LVM_SETITEM: { LVITEM *pLVItem = (LVITEM*) lParam; user_entered(pLVItem->pszText); } break; default: ; } return CallWindowProc(wndprocPrev, hwnd, uMsg, wParam, lParam); }
No scrolling text effects, never miss a name that’s on the list.
I did suggest once a methid to reduce loss of lines retrived from text. It’s not full proof unless you clear the text every once in a while, because after some time the text is being cut from the top and there’s no way to tell how much exactly (unless you subclass the text control, then you can tell exactly how much is deleted) simple code toocase EM_REPLACESEL: if (*LPCSTR(lParam) == 0) { DWORD start_sel = 0, end_sel = 0; CallWindowProc(wndprocPrev, hwnd, EM_GETSEL, WPARAM(&start_sel), LPARAM(&end_sel)); if (start_sel == 0 && end_sel > 0) { last_index -= end_sel; } } break;
April 2, 2009 at 3:00 am #187393AhFoxMemberthis looks interesting… any chance in VB.NET or C# ?
April 2, 2009 at 6:42 am #187392methodMemberThanks all for replies. String i looked at that project but it is not working with paltalk 9.6 build 313 .chike i wish i knew about subclassing …
The following code used to work but not now. Could any one tell me part should i change to make it work? I tried to use PAT or Jk’s spy 5.1 code generator but still i get zero for “MsgBox test & xxxxxxxxxxx”!! Hope you guys help me .Looking forward for replies.Thanks
Function GetChatText(ByVal room As String) On Error Resume Next Dim atla As Long Dim atlaxwin As Long Dim X As Long Dim richedita As Long Dim Button As Long Dim xx As Long Dim xxx As Long Dim xxxx As Long Dim xxxxx As Long Dim xxxxxx As Long Dim xxxxxxx As Long Dim xxxxxxxx As Long Dim xxxxxxxxx As Long Dim xxxxxxxxxx As Long Dim xxxxxxxxxxx As Long Dim xxxxxxxxxxxx As Long Dim xxxxxxxxxxxxx As String mywindowclass = FindWindow("DlgGroupChat Window Class", room) xx = FindWindowEx(mywindowclass, 0&, "wtl_splitterwindow", vbNullString) xxx = FindWindowEx(xx, 0&, "wtl_splitterwindow", vbNullString) xxxx = FindWindowEx(xxx, 0&, "wtl_splitterwindow", vbNullString) xxxxx = FindWindowEx(xxxx, 0&, "wtl_splitterwindow", vbNullString) xxxxxx = GetWindow(xxxxx, GW_CHILD) xxxxxxx = GetWindow(xxxxxx, GW_HWNDNEXT) xxxxxxxx = FindWindowEx(xxxxxxx, 0&, "atlaxwin71", vbNullString) xxxxxxxxx = FindWindowEx(xxxxxxx, xxxxxxxx, "atlaxwin71", vbNullString) xxxxxxxxxx = FindWindowEx(xxxxxxxxx, 0&, "#32770", vbNullString) xxxxxxxxxxx = FindWindowEx(xxxxxxxxxx, 0&, "richedit20a", vbNullString) GetChatText = GetRoomText(xxxxxxxxxxx) 'getlastlinecontroltext(richedita) MsgBox test & xxxxxxxxxxx End Function Function GetRoomText(Ihwnd As Long) As String Dim Textlen As Long Dim Text As String Textlen = SendMessage(Ihwnd, WM_GETTEXTLENGTH, 0, 0) If Textlen = 0 Then GetRoomText = "Enter a Room" Exit Function End If Textlen = Textlen + 1 Text = Space$(Textlen) Textlen = SendMessage(Ihwnd, WM_GETTEXT, Textlen, ByVal Text) GetRoomText = Left$(Text, Textlen) End Function
April 2, 2009 at 10:31 am #187391ChikeMember@NVYE wrote:
this looks interesting… any chance in VB.NET or C# ?
This code run in paltalk process, so VB.NET or C# are not the languages for the task.
It can be used by and comunicate with a VB.NET or C# application.April 2, 2009 at 3:53 pm #187390AhFoxMemberThis code run in paltalk process, so VB.NET or C# are not the languages for the task.
It can be used by and comunicate with a VB.NET or C# application.Sounds like a class library in C++. If you don’t mind can you upload the dll file and show us how to use it.
I have a very lack knowledge on C++ for the WIN processes hooking. I’m wondering is it comparable with WIN32 and 64 bit ? thanks
April 2, 2009 at 4:39 pm #187389ChikeMember@NVYE wrote:
Sounds like a class library in C++. If you don’t mind can you upload the dll file and show us how to use it.
I have a very lack knowledge on C++ for the WIN processes hooking. I’m wondering is it comparable with WIN32 and 64 bit ? thanks
Not a class library, but API to comunicate with paltalk.
At it’s current state it would be a bit complex to use in basic. It uses callbacks to send messages from paltalk to the application. The messages are sent over pipes and recived in a differe native thread and require delegates co be sent to the form.
I can make a simpler DLL that will comunicate using EM_COPYDATA and will be much easier to use in VB.NETApril 2, 2009 at 9:45 pm #187388AhFoxMemberWhat is the performance for this API do you know? Is it any faster than using the regular get Text?
April 2, 2009 at 11:13 pm #187387methodMemberNVYE can you show me a working example of get Text for paltalk 9.6 build 313 and a way to send text too room too ? All old methods stoped working !!
April 2, 2009 at 11:52 pm #187386ChikeMemberOf course it’s faster, let alone reliable. To begin with, t doesn’t poll, everything is done only when needed.
At most there is one context awitch and data copy between processes per event.
Paltalk send over 50 messages to insert of one line in text, current code use 6 to retrive it so it’s not more then 10% overhead to paltalk which is by itself very little.April 3, 2009 at 3:25 am #187385AhFoxMembermethod, if you use Paltalk integration from autopilot … it is working fine. He also provided you with source code. Make sure you check it out. It contained a bunch of useful information. I’m currently using his library for some of my programs.
April 3, 2009 at 3:52 am #187384methodMember@NVYE wrote:
method, if you use Paltalk integration from autopilot … it is working fine. He also provided you with source code. Make sure you check it out. It contained a bunch of useful information. I’m currently using his library for some of my programs.
Thanks for suggesting that..Could you point me to which one you are refaring ? I tried a few non worked !!
April 3, 2009 at 3:36 pm #187383AhFoxMemberHere is the direct link:
-
AuthorPosts
Related
- You must be logged in to reply to this topic.