- This topic has 3 replies, 3 voices, and was last updated 18 years ago by method.
Viewing 4 posts - 1 through 4 (of 4 total)
-
AuthorPosts
-
July 31, 2006 at 3:25 am #188541Project SPMember
guyz. herez the easier method to get the atl without
worryin abt the changin that paltalk make…………..
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
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
July 31, 2006 at 9:00 am #188544methodMembercan not we get this using class name spy programs too?
July 31, 2006 at 12:12 pm #188543DepartureMembernice work SP but i find it interesting you declare all thoses API’s and consts when only half of them are needed (as what you have written in your code)
for example:
where is “SendMessage”,”GW_CHILD”,”WM_GETTEXTLENGTH”,”WM_GETTEXT”
I dont see them being used in your code but yet they are declared…
Anyway great job :O)
July 31, 2006 at 5:15 pm #188542Project SPMemberyeah. iknow.. those r de ones ull be usin to do anythin…
and i was workin on someother thins…..too ;)… i tried many other things.
but i copied someof it… pasted here……so…..hvfun -
AuthorPosts
Related
Viewing 4 posts - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.