Question: I am drawing to a regular `HwndRengerTarget` but other windows, which have nothing to do with Direct2D, overlap it. 

The problem is that these windows get painted over when I draw to the `HwndRengerTarget`.

I would like to tell Direct2D not to touch a specific region of the `HwndRengerTarget` (i.e. don't touch the pixels that are already on the screen), so that these windows remain correctly visible.

Is that possible?

If I draw normally then call `RedrawWindow` on the windows, it flickers a lot.

Thanks.

Answer: 
Why not arrange the windows (HWNDs) so that the Direct2D one is at the bottom of the z-index? It should be the first child of its parent. Then clipping will be automatic. You may need the WS\_CLIPSIBLINGS window style.
If you want to manually restrict your rendering to a certain region you can use layers (`ID2D1Layer` objects). 
More info here [Layers Overview](http://msdn.microsoft.com/en-us/library/windows/desktop/dd756654(v=vs.85).aspx)

If the visible region is rectangular it may be simpler to use axis aligned clips via methods `PushAxisAlignedClip` and `PopAxisAlignedClip`. 
[ID2D1RenderTarget::PushAxisAlignedClip](http://msdn.microsoft.com/en-us/library/windows/desktop/dd742855(v=vs.85).aspx) 

Another method of restricting drawing to a certain shape is to render it to a bitmap and then use this bitmap via a bitmap brush in the `FillGeomtry` method.
[ID2D1RenderTarget::FillGeometry](http://msdn.microsoft.com/en-us/library/windows/desktop/dd371933(v=vs.85).aspx)