IDirectManipulationViewport::ActivateConfiguration method

Sets the configuration for input interaction.

Syntax


HRESULT ActivateConfiguration(
  [in]  DIRECTMANIPULATION_CONFIGURATION configuration
);

Parameters

configuration [in]

One or more values from DIRECTMANIPULATION_CONFIGURATION that specify the interaction configuration for the viewport.

Return value

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

Remarks

An interaction configuration specifies how the manipulation engine responds to input and which manipulations are supported. Any number of possible configurations can be added to the viewport using AddConfiguration before processing input.

Configurations can be switched by the application at runtime using ActivateConfiguration.

When a configuration is no longer required (and is not currently active), it can be removed using RemoveConfiguration.

If a configuration has not been added using AddConfiguration, it can be automatically added and then activated by calling ActivateConfiguration.

Note  If input processing is occurring, this call will fail.

This method fails if a drag and drop behavior has been specified.

A drag and drop behavior object cannot be attached after successfully calling this method.

Examples

The following example shows how to configure a viewport for horizontal panning.


HRESULT hr = pViewport>ActivateConfiguration(
    DIRECTMANIPULATION_CONFIGURATION_INTERACTION | 
    DIRECTMANIPULATION_CONFIGURATION_TRANSLATION_X);

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