This is a Visual Studio solution wrapping the method described by Kenny Kerr in https://docs.microsoft.com/en-us/archive/msdn-magazine/2014/june/windows-with-c-high-performance-window-layering-using-the-windows-composition-engine.
This application is a minimal example of using DirectComposition to draw per-pixel alpha-blended windows with Direct2D. It draws a semi-transparent circle that changes opacity on any key press.