D1117: Bitmap Is Not A Target
SetTarget failed because the bitmap does not have the TARGET option.
In order to set an ID2D1Bitmap as a target, it must be created using the D2D1_BITMAP_OPTIONS_TARGET flag. This flag is available as a field of D2D1_BITMAP_PROPERTIES1 used with ID2D1DeviceContext::CreateBitmap.
Ensure that the application creates its target bitmap using D2D1_BITMAP_OPTIONS_TARGET. If it creates the target bitmap using ID2D1RenderTarget::CreateBitmap, modify it to use ID2D1DeviceContext::CreateBitmap. When the TARGET flag is specified, Direct2D will also verify that the texture’s Direct3D attributes are compatible with its use as a target.