Click to See Complete Forum and Search --> : Capture windowed DirectX application to bitmap
Hazz
September 5th, 2009, 04:06 AM
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?
srelu
September 6th, 2009, 08:19 AM
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.
DrYap
September 6th, 2009, 09:33 AM
You can use this funtion:
HWND WindowFromPoint(Point p)
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.
Then use
HDC GetDC(HWND hWnd)
to get the HDC of the window
Mike Harnad
September 8th, 2009, 09:42 AM
This (http://www.codeguru.com/cpp/v-s/debug/logging/article.php/c6345/) may get you started on what you want to do.
Hazz
September 10th, 2009, 03:21 PM
This (http://www.codeguru.com/cpp/v-s/debug/logging/article.php/c6345/) may get you started on what you want to do.
Wow, thank you. This will really help alot!
Hazz
September 10th, 2009, 03:42 PM
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.
dglienna
September 10th, 2009, 07:07 PM
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
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.