Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

IDCompositionDevice::CreateVisual method

Creates a new visual object.

Syntax


HRESULT CreateVisual(
  [out]  IDCompositionVisual **visual
);

Parameters

visual [out]

Type: IDCompositionVisual**

The new visual object. This parameter must not be NULL.

Return value

Type: HRESULT

If the function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code. See DirectComposition Error Codes for a list of error codes.

Remarks

A new visual object has a static value of zero for the OffsetX and OffsetY properties, and NULL for the Transform, Clip, and Content properties. Initially, the visual does not cause the contents of a window to change. The visual must be added as a child of another visual, or as the root of a composition target, before it can affect the appearance of a window.

Examples

For an example, see How to Build a Simple Visual Tree.

Requirements

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

Dcomp.h

Library

Dcomp.lib

DLL

Dcomp.dll

See also

IDCompositionDevice
IDCompositionTarget::SetRoot
IDCompositionVisual::AddVisual

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.