IDirectManipulationViewport::SetInputMode method

Specifies if input is visible to the UI thread.

Syntax


HRESULT SetInputMode(
  [in]  DIRECTMANIPULATION_INPUT_MODE mode
);

Parameters

mode [in]

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

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

DirectManipulation.h

IDL

DirectManipulation.idl

IID

IID_IDirectManipulationViewport is defined as 28b85a3d-60a0-48bd-9ba1-5ce8d9ea3a6d

See also

IDirectManipulationViewport

 

 

Community Additions

ADD
Show:
© 2014 Microsoft