guyz. herez the easier method to get the atl without
worryin abt the changin that paltalk make..............
- Code: Select all
Option Explicit
Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Public Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Public Declare Function GetWindow Lib "user32" (ByVal hwnd As Long, ByVal wCmd As Long) As Long
Public Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hwnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long
Public Const GW_CHILD = 5
Public Const GW_HWNDNEXT = 2
Public Const WM_GETTEXT = &HD
Public Const WM_GETTEXTLENGTH = &HE
Public Function PT8ATLCClassName(ATLCLASS As Long) As String
Dim ATLCLASSLNG As Long
Dim sBUF As String
Dim sBUFLEN As Long
ATLCLASSLNG = GetWindow(ATLCLASS, GW_HWNDNEXT)
sBUFLEN = 256
sBUF = Space$(sBUFLEN - 1)
sBUFLEN = GetClassName(ATLCLASSLNG, sBUF, sBUFLEN)
PT8ATLCClassName = Left$(sBUF, sBUFLEN)
End Function
and to make it work here iz de example
- Code: Select all
Public Function GetRoomATL(PTRoom As String) As String
Dim ATL As Long
ATL = FindWindow("My Window Class", PTRoom)
ATL = FindWindowEx(ATL, 0, "WTL_SplitterWindow", vbNullString)
ATL = FindWindowEx(ATL, 0, "WTL_SplitterWindow", vbNullString)
ATL = FindWindowEx(ATL, 0, "WTL_SplitterWindow", vbNullString)
GetRoomATL = PT8ATLCClassName(ATL)
End Function




