Hi all. There is an external application that has a listview in one of its window. My intention is to highlight and send double click to one of its row .
So i tried to get the listview's hWnd value first but I don't know what class name it has. Most of other listviews got systemlistview32 name but not this one.I used PAT Jk's API spy 5.1 to get the code that help me find hWnd of the listview but unfortunetly when i used the PAT JK'S API Spy's code with the following code i got empty value for hwnd!
So I be happy if you guys tell me how we can deal with such a listview and find it hwnd valu? Looking forward for replies.Thanks
So i tried to get the listview's hWnd value first but I don't know what class name it has. Most of other listviews got systemlistview32 name but not this one.I used PAT Jk's API spy 5.1 to get the code that help me find hWnd of the listview but unfortunetly when i used the PAT JK'S API Spy's code with the following code i got empty value for hwnd!
So I be happy if you guys tell me how we can deal with such a listview and find it hwnd valu? Looking forward for replies.Thanks
Code:
Private Sub Command1_Click()
Dim hWnd As Long
hWnd = getHwnd
End sub
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private 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
Function getHwnd() As Long
'this part i used PAT or Jk's API spy 5.1
Dim atlc As Long, atlcf As Long, atla As Long
atlc = FindWindow("atl:008047c0", vbNullString)
atlcf = FindWindowEx(atlc, 0&, "atl:00819cf0", vbNullString)
atla = FindWindowEx(atlcf, 0&, "atl:00819a30", vbNullString)
getHwnd=atla
End Function