It doesn't have to be the latest version, it is totally fine if it is a few frames old.
What I'm trying to do is to display the screen itself inside a Window, but I don't want the window itself to show up in the miniature screen. I can think about a few possible hacks to accomplish this. The first one is hiding (in some way) the window, taking a screenshot and then making it visible again, but there is a chance that it will cause flicker:
How can I capture screen under my own window excluding my own window
Another option is through the Magnification API, but probably it still feels like a little bit of a hack.
Excluding certain windows from screen capture
I'm speculating that in a compositing desktop environment it should be possible to access the compositing engine and request a version of the compositing that doesn't include one or more layers. Most likely the result of this "extra" composition would be made available to the requesting application asynchronously, maybe a few frame laters.
Is there a way to do this using the Win32 API?
Some other relevant resources