DirectDraw Tutorials

This section contains a series of tutorials, each of which provides step-by-step instructions for implementing a simple DirectDraw application. These tutorials use many of the DirectDraw sample files that are provided with this SDK. The sample files begin with a DDEX prefix. These samples demonstrate how to set up DirectDraw, and how to use the DirectDraw methods to perform simple tasks.

·Tutorial 1: The Basics of DirectDraw (DDEX1)

·Tutorial 2: Loading Bitmaps on the Back Buffer (DDEX2)

·Tutorial 3: Blitting from an Off-Screen Surface (DDEX3)

·Tutorial 4: Color Keys and Bitmap Animation (DDEX4)

·Tutorial 5: Dynamically Modifying Palettes (DDEX5)

The samples in these tutorials use the older IDirectDraw and IDirectDrawSurface interfaces. If you want to update these examples so they use the DirectX 3 interfaces—IDirectDraw2 and IDirectDrawSurface2—add a QueryInterface for both interfaces, as described in What's New in IDirectDraw2? and What's New in IDirectDrawSurface2?. In addition, you must change the appropriate parameters of any methods that have been updated for IDirectDraw2 or IDirectDrawSurface2.

Note The DDEX samples files in these tutorials are written in C++. If you are using a C compiler, you must make the appropriate changes to the files for them to successfully compile. At the very least, you need to add the vtable and this pointers to the interface methods. For more information, see Accessing COM Objects by Using C.