createComponentSnapshot of transparent desktop component

I’m trying to create a transparent component, add it to the desktop, set always on top, then take a snapshot of it. Is there any way to make the background behind the transparent component appear in my snapshot?

When I try to achieve that effect in the example below I get the component but not the information behind it.

Results in

Is there something I can add (within JUCE or otherwise) that would allow me to accomplish this?

Something similar in functionality to SnagIt or any other screen capture software.

You’d need to use whatever the OS’s screenshot functions are. No idea how they work, I’ve never tried.

Take a look at PrintWindow() for Windows… But it’s not that simple - you would need to hack JUCE’s code.