Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

SetInertiaParameterInteractionContext function (interactioncontext.h)

Configures the inertia behavior of a manipulation (translation, rotation, scaling) after the contact is lifted.

Syntax

HRESULT SetInertiaParameterInteractionContext(
 [in] HINTERACTIONCONTEXT interactionContext,
 [in] INERTIA_PARAMETER inertiaParameter,
 [in] float value
);

Parameters

[in] interactionContext

The handle of the interaction context.

[in] inertiaParameter

One of the constants from INERTIA_PARAMETER enumeration.

[in] value

One of the following:

  • The rate of deceleration, in radians/ms2.
  • For translation, the relative change in screen location, in HIMETRIC units.
  • For rotation, the relative change in angle of rotation, in radians.
  • For scaling, the relative change in size, in HIMETRIC units.

Return value

If this function succeeds, it returns S_OK.

Otherwise, it returns an HRESULT error code.

Remarks

Interaction Context uses the inertia system setting for all manipulations (translation, rotation, scaling). This function overrides the system setting.

To restore the system setting, set value to INERTIA_PARAMETER_INVALID_VALUE (FLT_MAX).

Requirements

Requirement Value
Minimum supported client Windows 8 [desktop apps only]
Minimum supported server None supported
Target Platform Windows
Header interactioncontext.h
Library Ninput.lib
DLL Ninput.dll

See also

GetInertiaParameterInteractionContext function


Feedback

Was this page helpful?

Additional resources