SetCrossSlideParametersInteractionContext function

Configures the cross-slide interaction.

Syntax


HRESULT WINAPI SetCrossSlideParametersInteractionContext(
  _In_  HINTERACTIONCONTEXT interactionContext,
  _In_  UINT32 parameterCount,
  _In_  CROSS_SLIDE_PARAMETER *crossSlideParameters
);

Parameters

interactionContext [in]

The handle of the interaction context.

parameterCount [in]

Number of parameters to set.

crossSlideParameters [in]

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 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

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

None supported

Header

Interactioncontext.h

Library

Ninput.lib

DLL

Ninput.dll

See also

Interaction Context Functions
GetCrossSlideParameterInteractionContext
CROSS_SLIDE_PARAMETER
HINTERACTIONCONTEXT

 

 

Community Additions

ADD
Show:
© 2014 Microsoft