RegisterOutputCallbackInteractionContext2 function (interactioncontext.h)

Registers a callback to receive interaction events from an Interaction Context object.

Syntax

HRESULT RegisterOutputCallbackInteractionContext2(
  HINTERACTIONCONTEXT                  interactionContext,
  INTERACTION_CONTEXT_OUTPUT_CALLBACK2 outputCallback,
  void                                 *clientData
);

Parameters

interactionContext

Handle to the Interaction Context.

outputCallback

The INTERACTION_CONTEXT_OUTPUT_CALLBACK2 callback function.

clientData

A pointer to an object that contains information about the client. The value typically points to the object for which the member function is called (this).

Return value

If this function succeeds, it returns S_OK.

Otherwise, it returns an HRESULT error code.

Remarks

Provides enhanced gesture recognition support compared to INTERACTION_CONTEXT_OUTPUT_CALLBACK callback function.

Each instance of an Interaction Context is limited to one output callback. Registering a callback function overwrites any existing callback registration for the Interaction Context.

This function is typically called after the creation of an Interaction Context or when the Interaction Context is reassigned to another UI element.

Requirements

Requirement Value
Minimum supported client Windows 10 version 21H1
Minimum supported server Windows Server 2022
Target Platform Windows
Header interactioncontext.h

See also

INTERACTION_CONTEXT_OUTPUT_CALLBACK callback function

INTERACTION_CONTEXT_OUTPUT_CALLBACK2 callback function

INTERACTION_CONTEXT_OUTPUT structure

INTERACTION_CONTEXT_OUTPUT2 structure