Поделиться через


Creating Overlay Surfaces (Windows Embedded CE 6.0)

1/6/2010

Like all surfaces, you create an overlay surface by calling the IDirectDraw::CreateSurface method. To create an overlay, include the DDSCAPS_OVERLAY flag in the associated DDSCAPS structure.

Overlay support varies widely across display devices. As a result, you cannot be sure that a given pixel format will be supported by most drivers and must therefore be prepared to work with a variety of pixel formats. You can request information about the non-RGB formats that a driver supports by calling the IDirectDraw::GetFourCCCodes method.

When you attempt to create an overlay surface, it is advantageous to try creating a surface with the most desirable pixel format, falling back on other pixel formats if a given pixel format is not supported.

You can create overlay surface flipping chains. For more information, see Creating Complex Surfaces and Flipping Chains.

See Also

Concepts

Overlay Surfaces