English 中文(简体)
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 Glass 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.

最佳回答

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!

问题回答

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.





相关问题
How to read exact number of bytes from a stream (tcp) socket?

In winsock, both the sync recv and the async WSARecv complete as soon as there is data available in a stream socket, regardless of the size specified (which is only the upper limit). This means that ...

AcquireCredentialsHandle returns SEC_E_NO_CREDENTIALS

I created a self-signed certificate (created using OpenSSL) and installed it into the Certificate Store using the Certificates MMC snap-in (CertMgr.msc) on Windows Vista Ultimate. I have managed to ...

Calling Win32 EnumThreadWindows() in C#

I m trying to get a call to EnumThreadWindows working, but I always get a Wrong Parameter-Error, although my code is nearly the same as this example on pinvoke.net. I don t know why this doesn t work: ...

COM Basic links

folks can you provide me the tutorial link or .pdf for learning basic COM?. i do google it.. still i recommend answers of stackoverflow so please pass me.. Thanks

Handling multiple windows WIN32 API

HI I m trying to create an application in the Win32 environment containing more than one window. How do i do that? all the Win32 Tutorials on web i found only showed how to manage one window. How do i ...

Creating a thread in DllMain?

It seems that when a thread is created from within DllMain upon DLL_PROCESS_ATTACH it won t begin until all dll s have been loaded. Since I need to make sure the thread runs before I continue, I get a ...

热门标签