Skip to main content
IDirectManipulationViewport::AddConfiguration method

Adds an interaction configuration for the viewport.


HRESULT AddConfiguration(


configuration [in]

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.


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.


Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]






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

See also