Archived

This topic is now archived and is closed to further replies.

How can I get a screen dump and put it in my game???

This topic is 5658 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

You all know how in windows you can hit the key and get a bitmap of the current windows desktop saved to the clipboard. What do I have to call ( or do ) in my windows/directX code to get a current shot of the windows desktop and load it onto a Direct X surface/texture? I know how to load it to a surface/texture once I get it into bmp format, but do any of you know a good way my program can aquire that information from windows and save it in a bmp file or something? Any help would be greatly appreciated. Thanks.

Share this post


Link to post
Share on other sites
These are helpful, kind of. Maybe I should clarify, I actually want to take a snap shot of the users *desk top* before my game actually inits (or sometime during the init) I don''t want to take screen shots of my game, but rather the users desk top before my game starts basically. Kind of interesting yes, but I got a great idea for it.

Share this post


Link to post
Share on other sites
You can get a DC for the whole screen using NULL as the HWND-parameter in a call to GetDC (or a similar function), and then get the pixels through standard GDI functions (e.g. use BitBlt to transfer the contents of the screen to a BITMAP or something).

Share this post


Link to post
Share on other sites