It is possible to screencapture another direct x application using destop's DC to HBITMAP.
But is there a way to capture from partially covered DirectX window?
Printable View
It is possible to screencapture another direct x application using destop's DC to HBITMAP.
But is there a way to capture from partially covered DirectX window?
Never tried with DirectX but I suppose it should work.
If you mean you're trying to capture the content of a screen partially covered by your own appication, the techique is to hide your own window, perform the capture, then show your window again.
Before performing the capture, you may need a short delay to allow DirectX to repaint the area that was covered by your window.
You can use this funtion:
to get the window's handle, you pass an x,y point on the screen which is also on the application you want to capture.Code:HWND WindowFromPoint(Point p)
Then use
to get the HDC of the windowCode:HDC GetDC(HWND hWnd)
This may get you started on what you want to do.
The problem is to get IDirect3DSurface9 from another application.
I'd like to know how Fraps works. I can start recording any windowed DirectX application, then change focus to another window, say, notepad. And i can move notepad so it partially or fully cover DirectX application, but Fraps still continue to record that application.
Read the direct memory involve. Although that could be on-board the graphics card, or else system memory. Kind of defeats the purpose of DirectX.
I doubt you'll be able to record it, either