DirectX SDK

Step 4: Create Flipping Surfaces

[Visual Basic]

The information in this section pertains only to applications written in C and C++. See DirectDraw Visual Basic Tutorials.

[C++]

After you have set the display mode, you must create the surfaces on which to place your application. Because the DDEx1 example is using the IDirectDraw7::SetCooperativeLevel method to set the mode to exclusive (full-screen) mode, you can create surfaces that flip between the surfaces. If you were using SetCooperativeLevel to set the mode to DDSCL_NORMAL, you could create only surfaces that blit between the surfaces. Creating flipping surfaces requires the following steps, also discussed in this topic: