This is a weird problem.
I'm using BitBlt
to copy from the device context associated with my (WinForms) window handle to a bitmap, and it works (or so I thought).
But there's one machine where the WPF elements inside ElementHost just don't show up on the bitmap: there isn't a hole, it's just as if they were transparent and whatever is behind appears instead.
I've been playing around with one VM, one working and the other not. They both have the same OS version, I've whittled down the installed Programs and Features to be the same on both, and yet there is still one which works and the other not.
Has anyone come across this problem, and does anyone have any ideas where to start searching?
UPDATE: thanks to jsanalytics tip in the comment, I've worked out that it's Aero which stops the screenshot working properly. Now to work out why and what to do about it...