IDirectManipulationViewport::SetInputMode method (directmanipulation.h)

Specifies if input is visible to the UI thread.

Syntax

HRESULT SetInputMode(
  [in] DIRECTMANIPULATION_INPUT_MODE mode
);

Parameters

[in] mode

One of the values from DIRECTMANIPULATION_INPUT_MODE.

Return value

If the method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

DIRECTMANIPULATION_INPUT_MODE_AUTOMATIC is the default mode for Direct Manipulation.

Direct Manipulation consumes all the input that drives the manipulation and the application receives WM_POINTERCAPTURECHANGED messages.

In some situations an application may want to receive input that is driving a manipulation. Set DIRECTMANIPULATION_INPUT_MODE_MANUAL in this case. The application will receive all input messages, even input used by Direct Manipulation to drive a manipulation.

Note  The application will not receive WM_POINTERCAPTURECHANGED messages.
 
Calling this method with DIRECTMANIPULATION_INPUT_MODE_MANUAL set is similar to calling SetViewportOptions(DIRECTMANIPULATION_VIEWPORT_OPTIONS_INPUT). However, calling SetViewportOptions also overrides all other settings.

Examples

The following example shows how to use this method.

HRESULT hr = pViewport->SetInputMode(DIRECTMANIPULATION_INPUT_MODE_AUTOMATIC);

Requirements

Requirement Value
Minimum supported client Windows 8 [desktop apps only]
Minimum supported server Windows Server 2012 [desktop apps only]
Target Platform Windows
Header directmanipulation.h

See also

IDirectManipulationViewport