IDirectManipulationViewport::ActivateConfiguration method (directmanipulation.h)
Sets the configuration for input interaction.
Syntax
HRESULT ActivateConfiguration(
[in] DIRECTMANIPULATION_CONFIGURATION configuration
);
Parameters
[in] configuration
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.
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
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 |