Friday, September 02, 2011 2:12 AMI was wondering if it is at all possible to grab a window contents / image in all cases? That is, a window that's covered up by another window, a transparent window, etc.
It pains me deeply that Windows knows how to draw a window, but refuses access to this information. WM_PRINT does not work, because MS neglected to implement it in their BeginPaint function, something that would be trivial to do.
To aggravate matters, it is impossible to get transparency info on a window. If you use UpdateLayeredWindow, the app that created a window can't even do it. Windows, of course, knows very well what's transparent and what's not. How, if at all possible, can one coax Windows to give this info?
Do I have to hack into gdi.dll? Write my own? What will it take?
Please help! I simply must have these images!
Please note that using tricks such as temporarily moving the window to topmost and/or compositing on white+black background for transparency deduction is great for an app that takes 1 picture, but I have to take about 30 per second... And the screen mustn't be all messed up.
- Edited by JackSprat1 Friday, September 02, 2011 2:17 AM
Friday, September 02, 2011 2:55 AM
What you are trying to do? It would be unreliable to count on third-party apps to waste CPU cycles on painting covered windows.
The following is signature, not part of post
Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
Visual C++ MVP
- Edited by Sheng Jiang 蒋晟MVP Friday, September 02, 2011 4:03 AM