views:

394

answers:

2

Hi all, I am writing an app, which needs to take the screen shots automatically (just like pressing PrintScreen button). So please suggest me how to get this done. A raw 24 bit BMP image would suffice.

PLEASE NOTE: My app is in C, so any win32 APIs that can be called from my code is what I am looking for.

(Sometimes back I had got an example code from codeproject which used to get the screen shots but the mouse pointer user to blink when the screen shot is taken. As multiple shots are taken this looks irritating to the user, so I don't want the mouse pointer to blink!)

Regards, Chethan KR

+3  A: 

GetDC(NULL)+BitBlt()

To capture translucent/alpha/layered windows, you must pass the CAPTUREBLT flag to BitBlt, if you do that, the cursor blinks, read this technet article to find out why.

On NT6+, you might be able to use the Magnification API to do what you want.

Anders
Hi, Thanks for that.Now I remember, the one attempt I did which was causing the mouse pointer to blink was GetDC()+BitBlt(). Thats the main problem :( I don't want the pointer to blink... Any ways to get the screen shots seemlessly???
Microkernel
Just don't pass the CAPTUREBLT flag
Anders