tags:

views:

229

answers:

1

Hi everybody!

I would like to render a single image using DirectX. It should work similar to VLC player's "directx video output", were it is not possible to capture a frame using simple screen capturing software or the printscreen-key. It should not be possible (or very difficult) to make a screenshot!

Does anyone know how this works in VLC player?

Are there any other possible solutions? Maybe with "Output Protection Manager" (see http://msdn.microsoft.com/en-us/library/dd388980(VS.85).aspx)

I've about 3 years C# programming experiance earnt at school. I've also done some C++ programming, but I would prever a C# solution maybe using WPF or Managed DirectX.

Sorry for my English and thanks for your help in advance!!!

+1  A: 

Maybe by the sound of it you need to intercept WM_PRINTCLIENT by hooking into a global windows procedure, if the WM_PRINTCLIENT message is used, just return from the hooked window procedure. See here for a detailed information by Feng Yuan about WM_PRINTCLIENT. The other way of doing it is to intercept the clipboard functions where the data is from a particular application and the clipboard contains a bitmap.. See Larry Osterman's blog about this. Here is an article on CodeProject that implements a global windows hook, there's two other links I could supply here and here. (All on CodeProject)

Hope this helps, Best regards, Tom.

tommieb75
I tryed to get by with WM_PRINTCLIENT but I never got the WM_PRINTCLIENT Message. I used theprotected override void WndProc(ref Message m)of the main window in my applicationIntercepting clipboard functios doesn't work because screen capturing software doesn't ever safe the capture bitmap to clipboard (see Windows 7 Snipping Tool Options for example).
youllknow
@youllknow: If you look at the last link for CodeProject, there is a hook for the clipboard...As I do not have Windows 7 I cannot say how it works... :)
tommieb75
Yes there is, but a screen capturing software (for example Snipping Tool) does not use the clipboard. So the hook will never be executed!But thanks for your help!!!
youllknow
I think the only possible solution may is to use DirectX Output, that can't be captured (like in VLC if you set outputmode to directx-video-output).
youllknow