0

As the title suggest, i need to create an windows application which it not possible to capture using print screen.

The application will run on my computer and it will be shown in my screen. No internet involvement.

Is this possible to do this in C++?? or any other language??

Thank you.

user2389323
  • 769
  • 2
  • 10
  • 22

2 Answers2

2

As far as I know, there are two ways you could like to achieve it:

  1. Not allow print screens when your application is the window with focus - it is fairly

easy: you need to modify your window procedure to catch WM_HOTKEY and you cannot pass it back to the system:

case WM_HOTKEY:
/* your code */;
break; // no DefWndProc() call
  1. Not allow print screens at all, when your app is running. You will have to set up a hook, which will direct all of the messages, even those out of your window to your program. Accurate info can be found here: http://www.cubert.net/2008/05/sntt-disable-print-screen-key-win32-api.html

You can also let your user make print screens, but blank the window, when print screen is detected. To do that, in fragment:

case WM_HOTKEY: 
/* here you blank your window */;
DefWndProc(); // send the message about print screen back to the system.
break;

Of course it all depends on the API you use, but assuming you use bare WinAPI - this is the way you do it.

Michał
  • 2,202
  • 2
  • 17
  • 33
  • 1
    Do your suggestions handle a tool such as the *Snipping Tool*? – Thomas Matthews Nov 14 '13 at 20:03
  • @ThomasMatthews No, it doesn't. I suppose there is no way to disallow screening your window completely (maybe `ShowWindow(hwnd, SW_HIDE)`, but you can still try to achieve content by getting DeviceContext etc.). But when it comes to disable the 'capturing using the print screen', then in my books, print screen is a sys key, and the question is mostly about simple pressing this key. – Michał Nov 16 '13 at 00:33
1

You can do this "kind of" at best. You could capture the windows print screen events and do nothing, but 3rd party print screen don't depend on these. A nice hi-res digital camera is even harder to "code around"

Gary Walker
  • 8,831
  • 3
  • 19
  • 41