Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to correctly screencapture a specific window on Aero/DWM
    text
    copied!<p>Background info: I have this MFC application I coded and been using for a long time that pretty much automatically saves screenshots to the hard disk when the user hits the Print Screen/Alt+Print Screen key. I have been putting off using anything related to Aero until now that I've been using Windows 7 RC for a couple of weeks. </p> <p>The problem: I'm using the standard GetDC/BitBlt method to capture the window contents. I have no problems with this method while doing regular full-screen grabs (no matter how many windows are opened etc). The problem arises when I try capturing the foreground window (Alt+PrintScreen). Here are two examples:</p> <p>Example 1 <a href="http://indiecodelabs.com/extern/example1.jpg" rel="nofollow noreferrer">http://indiecodelabs.com/extern/example1.jpg</a></p> <p>Example 2 <a href="http://indiecodelabs.com/extern/example2.jpg" rel="nofollow noreferrer">http://indiecodelabs.com/extern/example2.jpg</a></p> <p>As you can see, I'm getting garbage where the borders should be. This is more noticeable towards the top, where we can see some duplication of the toolbar in both screenshots. </p> <p>I've been googling about this for hours now and all I can find are articles saying that under DWM the BitBtl/GetDC method won't work, but can't find a single one explaining what we (the developers) should do to be able to maintain the same functionality in our apps when running on DWM.</p> <p>Any help, pointers, suggestions will be greatly appreciated.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload