https://bugs.winehq.org/show_bug.cgi?id=2082
--- Comment #170 from Saulius K. saulius2@gmail.com --- Found some MSDN article called "Redirecting GDI, DirectX, and WPF applications" [4]. How do devs think, can it bring some simplicity for the situation?
--- quote --- Mixed DirectX and GDI Windows
The other reasonably common rendering to a top level window involves mixing DirectX and GDI. There are two forms of "mixing" here, one is perfectly fine, and the other is problematic.
_The form of mixing that is fine_ is when there is a window tree of the top level HWND and child HWNDs (and further children, etc), where each individual HWND is either rendered by DirectX or by GDI. In this situation, the redirection component of the DWM forms its own "composition tree" where each node in the tree represents a node or a set of "homogenously rendered nodes" in the "window tree" rooted at the top level HWND. Rendering occurs by having each of these render to their own surface, and then compositing this tree of surfaces to the desktop. Thus, mixed DirectX and GDI rendering works well, so long as the boundary between them is at least at the child HWND level.
_The form of mixing that _doesn't work well_ is when an application uses DirectX and GDI to target the same HWND. This has never been a supported scenario with DirectX, but there have been scenarios where it has happened to work. Under the DWM, this is much more problematic, because there can be no guarantee of ordering between the DirectX and the GDI rendering. This is most troublesome when GDI and DirectX are not only rendering to the same HWND, but to overlapping areas of the same HWND. As such, this usage pattern is not supported. Note that there is an alternative that can often work for an application -- DirectX is capable of handing back a DC to a DirectX surface, and applications can perform GDI rendering to that DC. From the DWM's perspective, that DirectX surface remains purely rendered by DirectX, and all is well. --- quote ---
[4] https://blogs.msdn.microsoft.com/greg_schechter/2006/05/03/redirecting-gdi-d...