D1186: DC Render Target Requires BindDC

It is invalid to use a DC render target before calling its BindDC method.

 

Possible Causes

The application created an ID2D1DCRenderTarget and used it to call BeginDraw, but did not yet call its BindDC method. Or, BindDC resulted in an error.

Possible Fixes

Before using a DC-interopped render target, applications should call BindDC to associate the target to a GDI device context. The target is not considered to be valid until a GDI device context has been assigned. See ID2D1DCRenderTarget::BindDC for an example. If the application already calls BindDC, ensure that BindDC did not return an error.