IDirectManipulationViewport::AddConfiguration method (directmanipulation.h)

Adds an interaction configuration for the viewport.

Syntax

HRESULT AddConfiguration(
  [in] DIRECTMANIPULATION_CONFIGURATION configuration
);

Parameters

[in] configuration

One of the values from DIRECTMANIPULATION_CONFIGURATION that specifies 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.

You cannot add another drag and drop behavior after an existing one has already been added.

This method is designed to allow an application to switch pre-added configurations, as a configuration cannot be changed while a manipulation is occurring. Under most circumstances it is better to update the configuration using ActivateConfiguration.

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