I solved that problem already, i sould have told everyone here, sorry
On Sun, Apr 30, 2017 at 11:13 PM Tim Roberts <[email protected]> wrote: > On Apr 28, 2017, at 5:40 PM, 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? > > > It would have been easier to help if you had showed us the code you're > trying to modify. > > I assume the code you're copying does GetDC(0) to grab a DC for the > desktop. If you instead pass the window handle of the window you want to > snapshot, just pass that to GetDC. You'll want to use GetWindowRect to > find the size of the window. > — > Tim Roberts, [email protected] > Providenza & Boekelheide, Inc. > > _______________________________________________ > python-win32 mailing list > [email protected] > https://mail.python.org/mailman/listinfo/python-win32 >
_______________________________________________ python-win32 mailing list [email protected] https://mail.python.org/mailman/listinfo/python-win32
