I noticed a few times than when I print-screen while Media Player is running, the content is replaced with a grey rectangle. I’ve no idea if it’s deliberate due to DRM, or some technical issue, but it struck me that being able to deliberately block screen-capture might be a useful feature in some scenarios. I am not looking to fix the problem, but replicate it!
Is there some specific message each HWND gets for print-screen – does Windows do a special repaint or simply dump buffers to the clipboard?
I guess I’d prefer to focus this on Win32 specifically, but as long as it’s Windows-related then fine.
You can register a hotkey, using this method.
Register the PrtScr key and your application will receive a message in your WndProc, WM_HOTKEY.
Once you recieve that, you can do something to your form to blank out the display, or something else.
That hotkey method should work even if your form is minimised.