Methods

Indicates that drawing with the device context retrieved using the GetDC method is finished.

Remarks

You don't create an ID2D1GdiInteropRenderTarget object directly; instead, you use the QueryInterface method of an existing render target instance to provide an ID2D1GdiInteropRenderTarget version of that render target.

Note that the QueryInterface method always succeeds; if the render target doesn't support the ID2D1GdiInteropRenderTarget interface, calling GetDC will fail. (For render targets created through the CreateCompatibleRenderTarget method, the render target that created it must have these settings.)

To test whether a given render target supports the ID2D1GdiInteropRenderTarget interface, create a D2D1_RENDER_TARGET_PROPERTIES that specifies GDI compatibility and the appropriate pixel format, then call the render target's IsSupported method to see whether the render target is GDI-compatible.