C# Hook Forms / Windows / Dialogs etc. (via HWND?) to Capture Video Buffer (D3D Device?)
Posted
by Drax
on Stack Overflow
See other posts from Stack Overflow
or by Drax
Published on 2010-01-12T09:27:04Z
Indexed on
2010/05/26
6:51 UTC
Read the original article
Hit count: 199
I am looking to create a very simple C# application which runs Full-Screen in Direct3D, and is able to grab the Desktop 'scene', mapping each Window from the Desktop to a Textured Polygon in my D3D Scene...
I'm hoping to create a simplistic "3D Desktop" type of application as an experiment, and I'm wondering if there is a specific method for doing something like the following:
1)Get a list of all the Windows open on the Desktop (List of HWNDs?).
2)Grab the X,Y position of each Window, as well as the Width and Height.
3)Grab the Rendered image of each Window (magic happens here).
4)Create a new Texture/Surface in D3D using the Width and Height of the Window(s), and apply the Image we grabbed as a Texture.
Is there an efficient 'best practice' for acquiring the actual image(s) being rendered to the Desktop?
Is there also a 'best practice' for "extending the desktop" to a virtual second, third, etc. "desktop" and being able to swap between them, including creating a unique instance of the task-bar for each virtual desktop.
Thanks a million for any suggestions!
© Stack Overflow or respective owner