Note

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

Access to this page requires authorization. You can try .

SetCrossSlideParametersInteractionContext function (interactioncontext.h)

Configures the cross-slide interaction.

Syntax

HRESULT SetCrossSlideParametersInteractionContext(
 [in] HINTERACTIONCONTEXT interactionContext,
 [in] UINT32 parameterCount,
 [in] CROSS_SLIDE_PARAMETER *crossSlideParameters
);

Parameters

[in] interactionContext

The handle of the interaction context.

[in] parameterCount

Number of parameters to set.

[in] crossSlideParameters

The cross-slide threshold and its distance threshold.

Return value

If this function succeeds, it returns S_OK.

Otherwise, it returns an HRESULT error code.

Remarks

SetCrossSlideParametersInteractionContext fails if a CROSS_SLIDE_PARAMETER structure is enabled, but not specified in the crossSlideParameters parameter.

Examples

This example demonstrates how to set custom cross-slide thresholds.

// SetCrossSlideParametersInteractionContext

CROSS_SLIDE_PARAMETER crossSlideParameters[4];
crossSlideParameters[0].threshold = CROSS_SLIDE_THRESHOLD_SELECT_START;
crossSlideParameters[0].distance = customSelectStart;
crossSlideParameters[1].threshold = CROSS_SLIDE_THRESHOLD_SPEED_BUMP_START;
crossSlideParameters[1].distance = customSpeedBumpStart;
crossSlideParameters[2].threshold = CROSS_SLIDE_THRESHOLD_SPEED_BUMP_END;
crossSlideParameters[2].distance = customSpeedBumpEnd;
crossSlideParameters[3].threshold = CROSS_SLIDE_THRESHOLD_REARRANGE_START;
crossSlideParameters[3].distance = customRearrangeStart;

// set thresholds for select, speedbump, and rearrange
SetCrossSlideParametersInteractionContext(
 m_interactionContext,
 4,
 crossSlideParameters);

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

CROSS_SLIDE_PARAMETER structure

GetCrossSlideParameterInteractionContext function


Feedback

Was this page helpful?

Additional resources