DirectX SDK

DDEx4 Sample

[Visual Basic]

This topic pertains only to application development in C and C++. See DirectDraw Visual Basic Samples.

[C++]

Description

The DDEx4 program is an extension of DDEx3. It demonstrates a simple animation technique.

Path

Source: (SDK root)\Samples\Multimedia\DDraw\Src\Ddex4

Executable: (SDK root)\Samples\Multimedia\DDraw\Bin\Ddex4.exe

User's Guide

DDEx4 requires no user input. Press F12 or ESC to quit the program.

This program requires at least 1.2 MB of video RAM.

Programming Notes

Unlike DDEx3, the DDEx4 program creates only one off-screen surface. It loads a bitmap containing a series of animation images onto this surface. To create the animation, it blits portions of the off-screen surface to the back buffer, then flips the front and back buffers.

The blitting routines illustrate the use of a source color key to create a sprite with a transparent background.