We are developing an application which takes a snapshot of a screen. We use a function from Windows API named "GetWindowDC" to get the handle of the application and we use a BitBlt to copy it.
We use GetWindowRect to get get the size of the window and ClientToScreen to get it's position.
We need to render the image from snapshots of the applications currently running, so the some application could be hide in the process.
The problem that we have is that the titlebar and borders of the application are not drawn properly. Instead of having them, it put some crap in arround our snapshot where the titlebar should appear.
P.S: We are using Windows 7.
We tried it on Windows XP and while we are getting the title bar and the borders, we are also getting a part that shoudn't be there. The region taken is too large.
Anyone got an idea, a solution? You can see the result bellow.