- This topic has 11 replies, 3 voices, and was last updated 11 years ago by light 2012.
-
AuthorPosts
-
January 19, 2013 at 12:18 pm #186677light 2012Member
this code don’t work with pal build 485 ,why?
Private Function EnumWindowsProc(ByVal hwnd As Long, ByVal lParam As String) As Long Dim strCaption As String Dim lLen As Long Dim syslistview As Long, cwndmembertree As Long Dim dlggroupchatwindowclass As Long, splitterwindowex As Long, classcpanecontainerex As Long Dim atlaae As Long, atlaaed As Long dlggroupchatwindowclass = FindWindow("dlggroupchat window class", Form1.Combo1.Text) splitterwindowex = FindWindowEx(dlggroupchatwindowclass, 0&, "splitterwindowex", vbNullString) splitterwindowex = FindWindowEx(splitterwindowex, 0&, "splitterwindowex", vbNullString) splitterwindowex = FindWindowEx(splitterwindowex, 0&, "splitterwindowex", vbNullString) splitterwindowex = FindWindowEx(splitterwindowex, 0&, "splitterwindowex", vbNullString) splitterwindowex = FindWindowEx(splitterwindowex, 0&, "splitterwindowex", vbNullString) classcpanecontainerex = FindWindowEx(splitterwindowex, 0&, "classcpanecontainerex", vbNullString) classcpanecontainerex = FindWindowEx(splitterwindowex, classcpanecontainerex, "classcpanecontainerex", vbNullString) atlaae = FindWindowEx(classcpanecontainerex, 0&, "atl:00a1ae40", vbNullString) atlaaed = FindWindowEx(atlaae, 0&, "atl:00a1aed0", vbNullString) hWndlvw = FindWindowEx(atlaaed, 0&, "syslistview32", vbNullString) ' If we've found a window with the SysListView32 class ' check to see if parent window caption is the one we are looking for If hWndlvw <> 0 Then lLen = GetWindowTextLength(hwnd) If lLen > 0 Then strCaption = Space(lLen) GetWindowText hwnd, strCaption, lLen + 1 End If End If EnumWindowsProc = (hWndlvw = 0 And strCaption <> lParam) End Function
and
Function NickGet() Dim dlggroupchatwindowclass As Long, splitterwindowex As Long, classcpanecontainerex As Long Dim atlaae As Long, atlaaed As Long, syslistview As Long dlggroupchatwindowclass = FindWindow("dlggroupchat window class", Form1.Combo1.Text) splitterwindowex = FindWindowEx(dlggroupchatwindowclass, 0&, "splitterwindowex", vbNullString) splitterwindowex = FindWindowEx(splitterwindowex, 0&, "splitterwindowex", vbNullString) splitterwindowex = FindWindowEx(splitterwindowex, 0&, "splitterwindowex", vbNullString) splitterwindowex = FindWindowEx(splitterwindowex, 0&, "splitterwindowex", vbNullString) splitterwindowex = FindWindowEx(splitterwindowex, 0&, "splitterwindowex", vbNullString) classcpanecontainerex = FindWindowEx(splitterwindowex, 0&, "classcpanecontainerex", vbNullString) classcpanecontainerex = FindWindowEx(splitterwindowex, classcpanecontainerex, "classcpanecontainerex", vbNullString) atlaae = FindWindowEx(classcpanecontainerex, 0&, "atl:00a1ae40", vbNullString) atlaaed = FindWindowEx(atlaae, 0&, "atl:00a1aed0", vbNullString) atlaaed = GetWindow(atlaaed, GW_CHILD) syslistview = FindWindowEx(atlaaed, 0&, "syslistview32", vbNullString) Call GetListviewItem(syslistview) End Function
January 20, 2013 at 11:26 am #186688light 2012MemberI upload an example
January 20, 2013 at 11:36 am #186687ChikeMemberAnd what you expect us do, debug it for you?
Which of the lines does not work exactly?January 20, 2013 at 1:07 pm #186686light 2012Memberi don’t now
i need to get highlight the nicks in paltalk listview
i couldn’t modify my old code which was for paltalk 10.2 build 474
i used PAT or JK’s to find the code but not workJanuary 20, 2013 at 3:55 pm #186685autopilotMemberYour spy screen shot sows the class as ATL:00A1AED0 yet in your code you are still trying to get a handle for a syslistview32.
January 20, 2013 at 5:16 pm #186684ChikeMemberYou seem not to understand, people here are not going to debug your code, you need to do it by yourself.
Anyway as I have said, you will keep running after your tail every little change they will make.
The following code works, and will continue to work as long there is one SysListView32 window in the group window.
I am not sure about marshalling so left it without any.
GetRoomNamesList takes the room handle as input and returns the handle to the SysListView32Public Delegate Function EnumWChildindowaProc(ByVal Handle As IntPtr, ByRef Parameter As Integer) As Boolean Public Declare Auto Function EnumChildWindows Lib "User32.dll" _ (ByVal hwnd As IntPtr, ByVal Callback As EnumWChildindowaProc, ByRef lParam As Integer) As Boolean Private Declare Auto Function RealGetWindowClass Lib "User32.dll" _ (hwnd As Integer, pszType As StringBuilder, ByVal cchType As UInteger) As Integer Function NamesListEnumProc(ByVal hWnd As IntPtr, ByRef lParam As Integer) As Boolean Dim buffer As StringBuilder = New StringBuilder(128) buffer.Length = RealGetWindowClass(hWnd, buffer, 128) If (buffer.Length > 0) And (buffer.ToString = "SysListView32") Then lParam = hWnd Return False End If Return True End Function Public Function GetRoomNamesList(ByVal hWndRoom As IntPtr) As Integer Dim result As Integer = 0 EnumChildWindows(hWndRoom, AddressOf NamesListEnumProc, result) Return result End Function
January 20, 2013 at 10:50 pm #186683light 2012MemberI found the problem in my code and solved it 🙂
thanks autopilot and chikeJanuary 20, 2013 at 11:01 pm #186682ChikeMemberYou will have another tomorrow.
Get rid of the problems alltogether. That code would work on any still working paltalk version.January 20, 2013 at 11:07 pm #186681light 2012MemberHow can I get nick without using PAT or JK’s api spy?
January 20, 2013 at 11:13 pm #186680ChikeMemberI just showed you how.
The only time that code won’t work is if there is no SysListView32 or more than one of them in the room window.January 21, 2013 at 1:50 am #186679autopilotMember@Chike wrote:
I just showed you how.
The only time that code won’t work is if there is no SysListView32 or more than one of them in the room window.in the most current version they have wrapped the syslistview32 into an ATL control. even though it is wrapped in an ATL, you can still read and select the same way as before. just need to use the new control name to fine the handle.
January 21, 2013 at 3:07 am #186678ChikeMember@autopilot wrote:
@Chike wrote:
I just showed you how.
The only time that code won’t work is if there is no SysListView32 or more than one of them in the room window.in the most current version they have wrapped the syslistview32 into an ATL control. even though it is wrapped in an ATL, you can still read and select the same way as before. just need to use the new control name to fine the handle.
Yes luckily it still function as SysListView32.
So quick change and the code should work on both this version and previous.
I also made some changes for a bit better efficiencyPrivate Declare Auto Function GetParent Lib "User32.dll" _ (hWnd As Integer) As Integer Function NamesListEnumProc(ByVal hWnd As IntPtr, ByRef lParam As Integer) As Boolean Static SysHeader32 As New String("SysHeader32") Static buffer As StringBuilder = New StringBuilder(128) buffer.Length = RealGetWindowClass(hWnd, buffer, 128) REM Console.WriteLine(buffer.ToString()) If (buffer.Length > 0) And (String.CompareOrdinal(buffer.ToString(), SysHeader32) = 0) Then lParam = GetParent(hWnd) Return False End If
-
AuthorPosts
Related
- You must be logged in to reply to this topic.