IDirectManipulationCompositor2::AddContentWithCrossProcessChaining method (directmanipulation.h)

Associates content (owned by the component host) with the compositor, assigns a composition device to the content, and specifies the position of the content in the composition tree relative to other composition visuals. Represents a compositor object that associates manipulated content with drawing surfaces across multiple processes.

Syntax

HRESULT AddContentWithCrossProcessChaining(
  [in] IDirectManipulationPrimaryContent *content,
  [in] IUnknown                          *device,
  [in] IUnknown                          *parentVisual,
  [in] IUnknown                          *childVisual
);

Parameters

[in] content

The content to add to the composition tree.

content is placed between parentVisual and childVisual in the composition tree.

Only primary content, created at the same time as the viewport, is valid.

[in] device

The device used to compose the content.

Note  device is created by the application.
 

[in] parentVisual

The parent visuals in the composition tree of the content being added.

parentVisual must also be a parent of childVisual in the composition tree.

[in] childVisual

The child visuals in the composition tree of the content being added.

parentVisual must also be a parent of childVisual in the composition tree.

Return value

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

Remarks

This method inserts a small visual tree (owned by the Direct Manipulation device) between the parentVisual and the childVisual. Transforms can then be applied to the inserted content.

All content, regardless of type, must be added to the compositor.

If the application uses a system-provided IDirectManipulationCompositor:

  • device must be an IDCompositionDevice object, and parent and child visuals must be IDCompositionVisual objects.
  • device, parentVisual, and childVisual cannot be NULL.
  • device, parentVisual, and childVisual objects are created and owned by the application.
  • When content is added to the composition tree using this method, the new composition visuals are inserted between parentVisual and childVisual. The new visuals should not be destroyed until they are disassociated from the compositor with RemoveContent.
If the application uses a custom implementation of IDirectManipulationCompositor:
  • device, parentVisual, and childVisual must be a valid type for the compositor. They do not have to be IDCompositionDevice or IDCompositionVisual objects.
  • device, parentVisual, and childVisual can be NULL, depending on the compositor.
The cross-process pointer events (WM_POINTERROUTEDAWAY, WM_POINTERROUTEDRELEASED, and WM_POINTERROUTEDTO) should be handled appropriately.

Requirements

Requirement Value
Target Platform Windows
Header directmanipulation.h

See also

IDirectManipulationCompositor2

WM_POINTERROUTEDAWAY

WM_POINTERROUTEDRELEASED

WM_POINTERROUTEDTO