DirectX SDK

Step 4: Flip the Surfaces

[Visual Basic]

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

[C++]

Flipping surfaces in the DDEx2 sample is essentially the same process as that in the DDEx1 tutorial (see Tutorial 1: The Basics of DirectDraw) except that if the surface is lost (DDERR_SURFACELOST), the bitmap must be reloaded on the back buffer by using the DDReLoadBitmap function after the surface is restored.