Compartir a través de


Win32HelperMethods.FindWindowByControlId Method

Retrieves the handle of the window that has matching Control ID 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 controlId As Integer
Dim matchCount As Integer
Dim ignoreProcThread As Boolean
Dim returnValue As IntPtr

returnValue = Win32HelperMethods.FindWindowByControlId(hWndParent, processId, threadId, controlId, matchCount, ignoreProcThread)

Syntax

'Declaration
Public Shared Function FindWindowByControlId ( _
    hWndParent As IntPtr, _
    processId As Integer, _
    threadId As Integer, _
    controlId As Integer, _
    matchCount As Integer, _
    ignoreProcThread As Boolean _
) As IntPtr
public static IntPtr FindWindowByControlId (
    IntPtr hWndParent,
    int processId,
    int threadId,
    int controlId,
    int matchCount,
    bool ignoreProcThread
)
public:
static IntPtr FindWindowByControlId (
    IntPtr hWndParent, 
    int processId, 
    int threadId, 
    int controlId, 
    int matchCount, 
    bool ignoreProcThread
)
public static IntPtr FindWindowByControlId (
    IntPtr hWndParent, 
    int processId, 
    int threadId, 
    int controlId, 
    int matchCount, 
    boolean ignoreProcThread
)
public static function FindWindowByControlId (
    hWndParent : IntPtr, 
    processId : int, 
    threadId : int, 
    controlId : int, 
    matchCount : int, 
    ignoreProcThread : boolean
) : IntPtr

Parameters

  • hWndParent
    Specifies the parent window.
  • processId
    Specifies the process ID.
  • threadId
    Specifies the thread ID.
  • controlId
    Specifies the control ID.
  • 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.