InitializeTouchInjection function

Configures the touch injection context for the calling application and initializes the maximum number of simultaneous contacts that the app can inject.

Note  InitializeTouchInjection must precede any call to InjectTouchInput.

 

Syntax

BOOL InitializeTouchInjection(
  UINT32 maxCount,
  DWORD  dwMode
);

Parameters

maxCount

The maximum number of touch contacts.

The maxCount parameter must be greater than 0 and less than or equal to MAX_TOUCH_COUNT (256) as defined in winuser.h.

dwMode

The contact visualization mode.

The dwMode parameter must be TOUCH_FEEDBACK_DEFAULT, TOUCH_FEEDBACK_INDIRECT, or TOUCH_FEEDBACK_NONE.

Return Value

If the function succeeds, the return value is TRUE.

If the function fails, the return value is FALSE. To get extended error information, call GetLastError.

Remarks

If TOUCH_FEEDBACK_DEFAULT is set, the injected touch feedback may get suppressed by the end-user settings in the Pen and Touch control panel.

If TOUCH_FEEDBACK_INDIRECT is set, the injected touch feedback overrides the end-user settings in the Pen and Touch control panel.

If TOUCH_FEEDBACK_INDIRECT or TOUCH_FEEDBACK_NONE are set, touch feedback provided by applications and controls may not be affected.

Requirements

   
Minimum supported client Windows 8 [desktop apps only]
Minimum supported server Windows Server 2012 [desktop apps only]
Target Platform Windows
Header winuser.h
Library User32.lib
DLL User32.dll

See Also

Functions