Example: AVI FilesExample FGIW3 shows how to play AVI files stored in FGI libraries, using both the high-level and low-level AVI functions. After opening the FGI file, the program's WM_CREATE handler calls fgi_aviopen() to open the CLOCK.AVI file and fg_aviplay() to display its first frame, as shown here. C/C++: fgi_aviopen("CLOCK.AVI",Context,hFGI); fg_aviplay(Context,1,0); Delphi: fgi_aviopen('CLOCK.AVI'+chr(0),Context,hFGI); fg_aviplay(Context,1,0); Visual Basic: Call fgi_aviopen("CLOCK.AVI", Context(0), hFGI) Call fg_aviplay(Context(0), 1, 0) The actual playing of the AVI file takes place through a keyboard event handler. When the F1 key is pressed, example FGIW3 uses fgi_showavi() to play CLOCK.AVI two times. When F2 is pressed, it uses the low-level AVI functions to do the same thing.
|
 
copyright 2001 Ted Gruber Software, Inc.