Step 4: Flipping the Surfaces

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.