|
This page is for program developers who wish to write their own AVI screen capture programs but don't really know where to start. There is no demo code on this page; download the project's source code to see how it really works internally. This page is just to tell you what is needed to make a screen capture program and hopefully will let you know "where to look" for further technical information, if the project source code is not making sense to you.
First let's start by summarizing the tasks that an AVI screen capture program must do.
- Have some way to "capture" the image of the screen
- Create and write to AVI files, with the ability to use existing codecs on the user's machine
- Have a "hotkey" termination, so the user can stop the capture by pressing ESC, or some other key
|
I wish I could say this was a simple step, but writing an AVI file is going to be much more difficult than just writing a bitmap file. Start by looking here: AVIFile Functions. The AVIFile library is a library designed to let you read and write AVI files without dealing with low level file I/O or video compression/decompression. I may add more information on this later, but for now, look at how the source code and observe how it uses the AVIFile functions to write the AVI file.
|
|
Since the AVI capture application window(s) dissapear during the capture, your application will not have focus when the user hits the escape key. Therefore we need a way to capture key presses that will be processed by other applications. This can be done with a keyboard hook. See SetWindowsHookEx for a starting point on hooks. I may add more information on this topic later, but for now look at the DLL project source code. There are two separate projects included in the ZIP file and the Microsoft Visual C++ one is the one that deals with the hook.
|
|