So I can use PIL to grab a screenshot of the desktop, and then use pywin32 to get its rectangle and crop out the part I want. However, if there's something in front of the window I want, it'll occlude the application I wanted a screenshot of. Is there any way to get what windows would say an application is currently displaying? It has that data somewhere, even when other windows are in front of it.
There is a way to do this, using the PrintWindow function. It causes the window to redraw itself on another surface.
Screenshot an application, regardless of what's in front of it?