Tutorial 6: Using Overlay Surfaces

This tutorial shows you, step by step, how to use DirectDraw and hardware supported overlay surfaces in your applications. The tutorial is written around the Mosquito sample application included with the DirectX Programmer's Reference samples. The Mosquito sample is a simple application that uses a flipping chain of overlay surfaces to display an animated bitmap on the desktop without blitting to the primary surface. The sample adjusts the characteristics of the overlay surface as needed to accommodate for hardware limitations.

The Mosquito sample application performs the following steps (complex tasks are divided into smaller sub-steps):

·Step 1: Creating a Primary Surface

·Step 2: Testing for Hardware Overlay Support

·Step 3: Creating an Overlay Surface

·Step 4: Displaying the Overlay Surface

·Step 5: Updating the Overlay Display Position

·Step 6: Hiding the Overlay Surface