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

Applications use the methods of the IDirectDrawSurfaceinterface to create DirectDrawSurfaceobjects and work with system-level variables.

IDirectDraw::CreateSurfacewill return a fully supported IDirectDrawSurfaceinterface pointer.

You cannot obtain the IDirectDrawSurfaceinterface directly from CreateSurface; use the QueryInterfacemethod to retrieve it.

The methods of the IDirectDrawSurfaceinterface can be organized into the following groups:

Allocating memory

IDirectDrawSurface::IsLost

 

IDirectDrawSurface::Restore

Attaching surfaces

IDirectDrawSurface::EnumAttachedSurfaces

Blitting

IDirectDrawSurface::AlphaBlt

 

IDirectDrawSurface::Blt

 

IDirectDrawSurface::GetBltStatus

Color keying

IDirectDrawSurface::GetColorKey

 

IDirectDrawSurface::SetColorKey

Device capabilities

IDirectDrawSurface::GetCaps

Device contexts

IDirectDrawSurface::GetDC

 

IDirectDrawSurface::ReleaseDC

Flipping

IDirectDrawSurface::Flip

 

IDirectDrawSurface::GetFlipStatus

Locking surfaces

IDirectDrawSurface::Lock

 

IDirectDrawSurface::Unlock

Miscellaneous

IDirectDrawSurface::GetDDInterface

Overlays

IDirectDrawSurface::EnumOverlayZOrders

 

IDirectDrawSurface::GetOverlayPosition

 

IDirectDrawSurface::SetOverlayPosition

 

IDirectDrawSurface::UpdateOverlay

 

IDirectDrawSurface::UpdateOverlayZOrder

Surface clipper

IDirectDrawSurface::GetClipper

 

IDirectDrawSurface::SetClipper

Surface characteristics

IDirectDrawSurface::GetPixelFormat

 

IDirectDrawSurface::GetSurfaceDesc

Surface palettes

IDirectDrawSurface::GetPalette

 

IDirectDrawSurface::SetPalette

The IDirectDrawSurfaceinterface, like all COM interfaces, inherits the IUnknowninterface methods.

The IUnknowninterface supports the following three methods:

IUnknown

IUnknown::AddRef

 

IUnknown::QueryInterface

 

IUnknown::Release

You can use the LPDIRECTDRAWSURFACEdata type to declare variables that point to various DirectDrawSurfaceobject interfaces.

The Ddraw.h header file declares this data type with the following code.

Copy Code
typedef struct IDirectDrawSurface	 FAR *LPDIRECTDRAWSURFACE;

Requirements

Header ddraw.h
Library ddraw.lib
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