Win32HelperMethods.FindWindowByCaptionAndClassText Method
Retrieves the handle of the window that has matching caption/class text through a BFS (Breadth-First Search) of the window handle tree rooted at hWndParent.
Namespace: Microsoft.Uii.HostedApplicationToolkit.DataDrivenAdapter
Assembly: Microsoft.Uii.HostedApplicationToolkit.DataDrivenAdapter (in Microsoft.Uii.HostedApplicationToolkit.DataDrivenAdapter.dll)
Usage
'Usage
Dim hWndParent As IntPtr
Dim processId As Integer
Dim threadId As Integer
Dim captionText As String
Dim captionMatchType As FindWindowMatchType
Dim classText As String
Dim classMatchType As FindWindowMatchType
Dim matchCount As Integer
Dim ignoreProcThread As Boolean
Dim returnValue As IntPtr
returnValue = Win32HelperMethods.FindWindowByCaptionAndClassText(hWndParent, processId, threadId, captionText, captionMatchType, classText, classMatchType, matchCount, ignoreProcThread)
Syntax
'Declaration
Public Shared Function FindWindowByCaptionAndClassText ( _
hWndParent As IntPtr, _
processId As Integer, _
threadId As Integer, _
captionText As String, _
captionMatchType As FindWindowMatchType, _
classText As String, _
classMatchType As FindWindowMatchType, _
matchCount As Integer, _
ignoreProcThread As Boolean _
) As IntPtr
public static IntPtr FindWindowByCaptionAndClassText (
IntPtr hWndParent,
int processId,
int threadId,
string captionText,
FindWindowMatchType captionMatchType,
string classText,
FindWindowMatchType classMatchType,
int matchCount,
bool ignoreProcThread
)
public:
static IntPtr FindWindowByCaptionAndClassText (
IntPtr hWndParent,
int processId,
int threadId,
String^ captionText,
FindWindowMatchType captionMatchType,
String^ classText,
FindWindowMatchType classMatchType,
int matchCount,
bool ignoreProcThread
)
public static IntPtr FindWindowByCaptionAndClassText (
IntPtr hWndParent,
int processId,
int threadId,
String captionText,
FindWindowMatchType captionMatchType,
String classText,
FindWindowMatchType classMatchType,
int matchCount,
boolean ignoreProcThread
)
public static function FindWindowByCaptionAndClassText (
hWndParent : IntPtr,
processId : int,
threadId : int,
captionText : String,
captionMatchType : FindWindowMatchType,
classText : String,
classMatchType : FindWindowMatchType,
matchCount : int,
ignoreProcThread : boolean
) : IntPtr
Parameters
- hWndParent
Specifies the parent window.
- processId
Specifies the process ID.
- threadId
Specifies the thread ID.
- captionText
Specifies the caption.
- captionMatchType
Specifies the caption match type.
- classText
Specifies the class text.
- classMatchType
Specifies the class match type.
- matchCount
Specifies the match count.
- ignoreProcThread
True to ignore processor thread, otherwise false.
Return Value
Type: IntPtr
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms
See Also
Reference
Win32HelperMethods Class
Win32HelperMethods Members
Microsoft.Uii.HostedApplicationToolkit.DataDrivenAdapter Namespace
Unified Service Desk
Send comments about this topic to Microsoft.
© 2015 Microsoft. All rights reserved.