Take screenshot of entire monitor and save automatically in one button press

How to capture entire screen shot of current monitor view in one button press. I am working on image processing for optical character recognition. The computer continues to play a live video of 1020p with 30 frames per second. Whenever the user feels, he will hit a key on the keyboard. The key is a key on a keyboard and can be any thing and is configurable. I would like to know if it is possible to capture the screen as image in Cpp programming? How to run the program in background yet allow th user to watch the live video? Or there any other languages with good support for my requirement?
