Share via


InputActivationListener.GetForWindowId(WindowId) Method

Definition

Retrieves a InputActivationListener object for the specified top-level window.

public:
 static InputActivationListener ^ GetForWindowId(WindowId windowId);
 static InputActivationListener GetForWindowId(WindowId const& windowId);
public static InputActivationListener GetForWindowId(WindowId windowId);
function getForWindowId(windowId)
Public Shared Function GetForWindowId (windowId As WindowId) As InputActivationListener

Parameters

windowId
WindowId

The window identifier.

Returns

A InputActivationListener object for the specified top-level window, or a new InputActivationListener if one doesn't exist.

If windowId is invalid, is owned by a different thread than the calling thread, or is a child window, GetForWindowId returns null.

Remarks

GetForWindowId only supports top-level windows on the same thread as the caller.

Calling GetForWindowId multiple times will return the same object each time.

In all cases there can only be a single InputActivationListener associated with a particular Window ID.

Applies to

See also