Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This structure defines the capabilities of a DirectDrawSurfaceobject. This structure is part of the DDCAPSand DDSURFACEDESCstructures.

Syntax

typedef struct _DDSCAPS{ 
  DWORD 
dwCaps; 
} DDSCAPS, FAR* LPDDSCAPS; 

Members

dwCaps

Capabilities of the surface. The following table shows the possible flags.

Flag Description

DDSCAPS_ALPHA

Indicates that this surface contains alpha-only information.

DDSCAPS_BACKBUFFER

Indicates that this surface is the back buffer of a surface flipping structure.

Typically, this capability is set by the CreateSurfacemethod when the DDSCAPS_FLIPflag is used.

Only the surface that immediately precedes the DDSCAPS_FRONTBUFFERsurface has this capability set.

The other surfaces are identified as back buffers by the presence of the DDSCAPS_FLIPflag, their attachment order, and the absence of the DDSCAPS_FRONTBUFFERand DDSCAPS_BACKBUFFERcapabilities.

If this capability is sent to the CreateSurfacemethod, a stand-alone back buffer is being created.

After this method is called, this surface could be attached to a front buffer, another back buffer, or both to form a flipping surface structure.

DDSCAPS_DYNAMIC

Unsupported.

DDSCAPS_FLIP

Indicates that this surface is a part of a surface flipping structure.

When this capability is passed to the CreateSurfacemethod, a front buffer and one or more back buffers are created.

DirectDraw sets the DDSCAPS_FRONTBUFFERbit on the front-buffer surface and the DDSCAPS_BACKBUFFERbit on the surface adjacent to the front-buffer surface.

The dwBackBufferCountmember of the DDSURFACEDESCstructure must be set to at least 1 for the method call to succeed.

DDSCAPS_FRONTBUFFER

Indicates that this surface is the front buffer of a surface flipping structure.

This flag is typically set by the CreateSurfacemethod when the DDSCAPS_FLIPcapability is set.

If this capability is sent to the CreateSurfacemethod, a stand-alone front buffer is created.

This surface will not have the DDSCAPS_FLIPcapability.

DDSCAPS_NOTUSERLOCKABLE

Unsupported.

DDSCAPS_OVERLAY

Indicates that this surface is an overlay.

It may or may not be directly visible depending on whether it is currently being overlaid onto the primary surface.

DDSCAPS_VISIBLEcan be used to determine if it is being overlaid at the moment.

DDSCAPS_PALETTE

Not supported.

DDSCAPS_PRIMARYSURFACE

Indicates the surface is the primary surface.

It represents what is seen by the user at the moment.

DDSCAPS_READONLY

Indicates that only read access is permitted to the surface. When locking the surface with IDirectDrawSurface::Lock, the DDLOCK_READONLYflag must be specified.

DDSCAPS_SYSTEMMEMORY

Indicates that this surface memory was allocated in system memory.

DDSCAPS_VIDEOMEMORY

Indicates that this surface exists in display memory.

DDSCAPS_WRITEONLY

Indicates that only write access is permitted to the surface.

Read access from the surface may generate a general protection (GP) fault, but the read results from this surface will not be meaningful.

Requirements

Header ddraw.h
Windows Embedded CE Windows Embedded CE 6.0 and later
Windows Mobile Pocket PC for Windows Mobile Version 5.0 and later, Smartphone for Windows Mobile Version 5.0 and later