Context: |
Function |
Library/Class: |
WinAPIWrapper |
Function GetTopLevelWindows() As
GetTopLevelWindows (WList() As WinList) As Integer
GetTopLevelWindows will return the list of all application Windows running on the Windows Desktop. The function call is identical to calling GetWindowList(0,0,WList,0,0,1).
Parameters:
WinLst (WinList)
Blank (empty) window list to be used as return parameter. For further details
refer to the type definition of WinList.
Return Values:
Parameter WinLst (WinList) - array of type WinList containing the details of collected
child windows.
Integer. Number of elements (windows) returned in WinLst.
Example:
Call GetTopLevelWindows(WList)
Forall Win In WList
If Win.ClassName = "OpusApp" Then
Call MessageDialog("Found Word Task Running. Window Title: " & _
Win.Title,0,"GetTopLevelWindows Example")
Elseif Win.ClassName = "XLMAIN" Then
Call MessageDialog("Found Excel Task Running. Window Title: " & _
Win.Title,0,"GetTopLevelWindows Example")
Else
Call MessageDialog("Found Unknown Task Class Running. " & _
Window Title: ",Win.Title,0,"GetTopLevelWindows Example")
End If
End Forall
|