Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Capture Screen in Directx Game

0 views
Skip to first unread message

yuanchang

unread,
Dec 25, 1998, 3:00:00 AM12/25/98
to
Hi,my friends:

Now I am writing a program. I wish to add a function to capture game screen
in directX.
I use win32 sdk, but don't have any idea how to do that. Can you give me
some hints
about using proper API or tell me where I can get some examples to study.
It's important to me. If ....any idea,please reply me. Thank you very
much,my dear.

Margaret Lourie

unread,
Dec 26, 1998, 3:00:00 AM12/26/98
to
There is an MS sample called WINCAP32 that shows
how to capture a window, but I can tell you it works
in short. It's quite simple. Create a memory DC with
CreateCompatibleDC() and a bitmap that is the size
of your window. Then call GetDC() passing the handle
of the window that you want to capture. Then do a
BitBlt() with the DC from GetDC() as the source and
your memory DC as the destination. If you have passed
sensible values for the coordinates, the memory bitmap
will now contain the image of the window.
0 new messages