Tutorial 1: The Basics of DirectDraw
To use DirectDraw, you first create an instance of the DirectDraw object, which represents the display adapter on the computer. You then use the interface methods to manipulate the object. In addition, you need to create one or more instances of a DirectDrawSurface object to be able to display your application on a graphics surface.
To demonstrate this, the DDEX1 sample included with this Programmer's Reference performs the following steps:
·Step 1: Creating a DirectDraw Object
·Step 2: Determining the Application's Behavior
·Step 3: Changing the Display Mode
·Step 4: Creating Flipping Surfaces
·Step 5: Rendering to the Surfaces
·Step 6: Writing to the Surface
·Step 7: Flipping the Surfaces
·Step 8: Deallocating the DirectDraw Objects
Note: To use GUIDs successfully in your applications, you must either define INITGUID prior to all other include and define statements, or you must link to the Dxguid.lib library. You should define INITGUID in only one of your source modules.