   Preventing user screenshots in special cases
  Let's suppose my game displays a special, "secret" graphic when the player beats the game, and I want to prevent him from posting a "spoiler screenshot" to his blog or whatever.  How?  How do I thwart the PrintScreen key in a D3D app?My only idea is to display the secret graphic in a hardware overlay.  I noticed a long time ago that you can't take screenshots of movies playing in Windows Media Player.  This is because WMP uses an overlay, rather than drawing the video frames to a regular D3D backbuffer.So, how do I display a graphic in an overlay?  Can someone recommend a library, or some component of the sprawling Windows platform SDK? (Currently, all graphics in my game are via DX8.1 D3D.)   
  The user could take a photograph of the screen anyway, so there is no point preventing screen capturing. This is not exactly an answer to your question, but it is still something that you should remember.   ;  DirectDraw has support for the hardware overlay, there might be an example in one of the older DX SDK's. I'm not sure if you can use it along with D3D though.Also check this topic:unmanaged overlaying sample.;  you can catch printscreen key and when it s pressed, just assign something different to clipboard, like "please do not capture this scene :)"   ;  I like by's suggestion. Here's the code I found to override the PrintScreen key (to just do nothing, in my case). While not fool-proof, I think this will thwart 90% of people.// override printscreen and alt+printscreen hotkeys to do nothingRegisterHotKey( m_hWnd, IDHOT_SNAPDESKTOP, 0, VK_SNAPSHOT);RegisterHotKey( m_hWnd, IDHOT_SNAPWINDOW, 0, VK_SNAPSHOT);// display secret stuff// note: a well-behaved app should only leave these hotkeys broken while it has focus// restore printscreen and alt+printscreen hotkeysUnregisterHotKey( m_hWnd, IDHOT_SNAPDESKTOP);UnregisterHotKey( m_hWnd, IDHOT_SNAPWINDOW);;  Oh, cool, thanx, i'll use that. It definately feels more prefessional when you have the little things like that.   ;  Since most users don't use any third party softwares to get screenshots from games, it is a good way, at least i think.But "over protection causes theft" :). So they can easily get screenshots from your game using these softwares. To avoid this, perhaps you could assign a string to clipboard in every loop. But it doesn't sounds like a good idea. Performance etc.   ;  I think that most(if not every) third-party screen capturing programs, when they are set up to catch DirectX screen, need to lock the front buffer, this call can  easily be hooked(link to how to do this has already been posted). So, the only thing you can do to avoid unauthorized screen-capturing is to hook GetFrontBuffer call up and return a  NULL texture(or a watermarked texture or whatever).   