开发者

Screenshot of window

I'm trying to take screenshots of all open windows, also the minimized ones. Currently I'm using this code: http://www.developerfusion.com/code/4630/capture-a-screen-shot/

But it doesn't work for minimized windows and the areas where there is a Glas开发者_JS百科s effect since Vista like the explorer title bar are black. Can anyone help me out?

My objective is to create something similar to Flip 3D; it would be great if someone also knew something about how to create a live preview.


For the glass effect areas: I think it doesn't work because those areas may be drawn with some strange DirectX method instead of normal GDI.

For the minimized windows problem: if a window is minimized, its DC isn't painted (conceptually, it doesn't even have a reason to exist); you should try to send to such windows a WM_PRINT message, asking them to paint themselves on the DC you'll provide them. The problem with this approach is that not all the windows handle correctly WM_PRINT.


I've found the API that is used for the taskbar previews a.s.o.:

DWM Thumbnail Overview

Pretty awesome, it even allows you to do live previews!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜