Jump to content

View more

Image of the Day

#ld38 #screenshotsaturday Mimosa Fizz action gif #2 https://t.co/TUzdppvfUL
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

how do i capture the screen with the windows api?

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
2 replies to this topic

#1 / rouncer   Members   

294
Like
0Likes
Like

Posted 10 April 2014 - 03:48 AM

it could be as simple as forcing a print screen, but im not sure how to do that either.

 

i need this because it makes video import alot easier into my video editor, I can then insert anything into it just by playing the to be imported videos in fullscreen mode.

 

 



#2 Vortez   Members   

2710
Like
3Likes
Like

Posted 10 April 2014 - 04:10 AM

Well, you are lucky cause i just finished working on a similar project. I don't really feel like rewriting it so you gonna have to take what you can from the code and adapt it to yours. Note that this code support all bit per pixels a bitmap can have(except 24), but you probably only need the 32 or 24 bit one, so just ignore the palette stuffs. Also, ignore the FillScreenshotInfo() and CreateEmpty() functions, but FillBMIHeader() is important to keep. You might also need this code for the cursor part, and this class to calculate the buffer size required for the bitmap(It return the 4-bytes aligned size needed).

 

Actually, here's a more simple version of the code, but i can't garanty it is 100% bug free (might be missing a ReleaseDC() somewhere, or not).


Edited by Vortez, 10 April 2014 - 04:52 AM.


#3 Vortez   Members   

2710
Like
0Likes
Like

Posted 10 April 2014 - 02:16 PM

So? Any progress?






Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.