Re: Saving a Device context (DC) into a picture file

eryk sun <[email protected]> Sat, 29 Apr 2017 00:34:51 +0000
Newsgroups gmane.comp.python.ctypes
Message-ID <CACL+1auVNqS2jKvzZS7ovCtwXLXnn5yMG19HNE2S6-eiawCB1Q@mail.gmail.com>
On Sat, Apr 29, 2017 at 12:28 AM, Michael C
<[email protected]> wrote:
>
> I have my own code that samples pixel colour,
> https://pastebin.com/4EMd765h
>
>  and now I am trying to add the feature of saving the Device Context to a
> .bmp file, so I found this code
>
> https://books.google.ca/books?id=9MS9BQAAQBAJ
>
> however there is one problem: The book example screenshots the whole desktop
> and I only want a screenshot of a given window. Is there a way to modify the
> black hat example into something that only screenshot a window given its
> handle?

This is a general WinAPI question, so if you don't mind, could you
please ask it on the python-win32 list instead?

https://mail.python.org/mailman/listinfo/python-win32

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot