DDSURFACEDESC

typedef struct _DDSURFACEDESC{

DWORD dwSize;

DWORD dwFlags;

DWORD dwHeight;

DWORD dwWidth;

LONG lPitch,

DWORD dwBackBufferCount,

union

{

DWORD dwMipMapCount,

DWORD dwZBufferBitDepth,

DWORD dwRefreshRate,

};

DWORD dwAlphaBitDepth;

DWORD dwReserved;

LPVOID lpSurface;

DDCOLORKEY ddckCKDestOverlay;

DDCOLORKEY ddckCKDestBlt;

DDCOLORKEY ddckCKSrcOverlay;

DDCOLORKEY ddckCKSrcBlt;

DDPIXELFORMAT ddpfPixelFormat;

DDSCAPS ddsCaps;

} DDSURFACEDESC, FAR* LPDDSURFACEDESC;

Is passed to the IDirectDraw::CreateSurface method with a description of the surface that should be created. The relevant members differ for each potential type of surface.

dwSize

Size of the structure. This must be initialized before the structure is used.

dwFlags

Specifies the optional control flags.

DDSD_ALL

All input members are valid.

DDSD_ALPHABITDEPTH

Indicates the dwAlphaBitDepth member is valid.

DDSD_BACKBUFFERCOUNT

Indicates the dwBackBufferCount member is valid.

DDSD_CAPS

Indicates the ddsCaps member is valid.

DDSD_CKDESTBLT

Indicates the ddckCKDestBlt member is valid.

DDSD_CKDESTOVERLAY

Indicates the ddckCKDestOverlay member is valid.

DDSD_CKSRCBLT

Indicates the ddckCKSrcBlt member is valid.

DDSD_CKSRCOVERLAY

Indicates the ddckCKSrcOverlay member is valid.

DDSD_HEIGHT

Indicates the dwHeight member is valid.

DDSD_LPSURFACE

Indicates the lpSurface member is valid.

DDSD_MIPMAPCOUNT

Indicates the dwMipMapCount member is valid.

DDSD_PITCH

Indicates the lPitch member is valid.

DDSD_PIXELFORMAT

Indicates the ddpfPixelFormat member is valid.

DDSD_REFRESHRATE

Indicates the dwRefreshRate member is valid.

DDSD_WIDTH

Indicates the dwWidth member is valid.

DDSD_ZBUFFERBITDEPTH

Indicates the dwZBufferBitDepth member is valid.

dwHeight

Height of surface.

dwWidth

Width of input surface.

lPitch

Distance to start of next line (return value only).

dwBackBufferCount

Number of back buffers.

dwMipMapCount

Number of mipmap levels.

dwZBufferBitDepth

Depth of z-buffer.

dwRefreshRate

Refresh rate (used when the display mode is described).

dwAlphaBitDepth

Depth of alpha buffer.

dwReserved

Reserved.

lpSurface

Address of the associated surface memory.

ddckCKDestOverlay

Color key for destination overlay use.

ddckCKDestBlt

Color key for destination blit use.

ddckCKSrcOverlay

Color key for source overlay use.

ddckCKSrcBlt

Color key for source blit use.

ddpfPixelFormat

Pixel format description of the surface.

ddsCaps

DirectDraw surface capabilities.