createComponentSnapshot of transparent desktop component


#1

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.


#2

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


#3

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

http://weseetips.com/2008/07/14/how-to-capture-the-screenshot-of-window/
http://stackoverflow.com/questions/7292757/how-to-get-screenshot-of-a-window-as-bitmap-object-in-c