I've been looking into using the wx python package on Windows 7. Specifically, I would like to be able to get the image data of a existing window (i.e. not a window opened by the python program). It appears I can do this by getting the window's device context, creating a compatible device context, copying the bitmap, and then using it how I like from there. The problem is that I can't seem to find the way to get the device context (or the handle) of an existing window. I only see ways to get them from windows the python program using wx created. How might I be able to go about doing this? Thank you much!
wx may not have a way to do this. The Windows APIs you need are pretty simple, and you can use them through First, I don't know how you're planning to identify the window you want. If you have its class and name, you can just At this point, you can just call If you can't do that for whatever reason, | |||||||||||||||||||||
|
Just to expand on the other answer, try this code (untested, I'm not on Windows right now)...
| |||||
|