Applications use the methods of the IDirectDrawSurface4 interface to create DirectDrawSurface objects and work with system-level variables. This section is a reference to the methods of this interface. For a conceptual overview, see Surfaces.
The methods of the IDirectDrawSurface4 interface can be organized into the following groups:
Allocating memory | Initialize |
IsLost | |
Restore | |
Attaching surfaces | AddAttachedSurface |
DeleteAttachedSurface | |
EnumAttachedSurfaces | |
GetAttachedSurface | |
Blitting | Blt |
BltBatch | |
BltFast | |
GetBltStatus | |
Color keying | GetColorKey |
SetColorKey | |
Device contexts | GetDC |
ReleaseDC | |
Flipping | Flip |
GetFlipStatus | |
Locking surfaces | Lock |
PageLock | |
PageUnlock | |
Unlock | |
Miscellaneous | GetDDInterface |
Overlays | AddOverlayDirtyRect |
EnumOverlayZOrders | |
GetOverlayPosition | |
SetOverlayPosition | |
UpdateOverlay | |
UpdateOverlayDisplay | |
UpdateOverlayZOrder | |
Private surface data | FreePrivateData |
GetPrivateData | |
SetPrivateData | |
Surface capabilities | GetCaps |
Surface clipper | GetClipper |
SetClipper | |
Surface characteristics | ChangeUniquenessValue |
GetPixelFormat | |
GetSurfaceDesc | |
GetUniquenessValue | |
SetSurfaceDesc | |
Surface palettes | GetPalette |
SetPalette |
The IDirectDrawSurface4 interface, like all COM interfaces, inherits the IUnknown interface methods. The IUnknown interface supports the following three methods:
IUnknown | AddRef |
QueryInterface | |
Release |
The IDirectDrawSurface4 interface extends the features of previous versions of the interface by offering methods that offer better surface management and ease of use. Note that many methods in this interface accept slightly different parameters than their counterparts in former versions of the interface. Wherever an IDirectDrawSurface3 interface method might accept a DDSURFACEDESC structure or an IDirectDrawSurface3 interface, the methods in IDirectDrawSurface4 accept a DDSURFACEDESC2 structure or an IDirectDrawSurface4 interface instead.
You can use the LPDIRECTDRAWSURFACE, LPDIRECTDRAWSURFACE2, LPDIRECTDRAWSURFACE3, or LPDIRECTDRAWSURFACE4 data types to declare variables that point to various DirectDrawSurface object interfaces. The Ddraw.h header file declares these data types with the following code:
typedef struct IDirectDrawSurface FAR *LPDIRECTDRAWSURFACE;
typedef struct IDirectDrawSurface2 FAR *LPDIRECTDRAWSURFACE2;
typedef struct IDirectDrawSurface3 FAR *LPDIRECTDRAWSURFACE3;
typedef struct IDirectDrawSurface4 FAR *LPDIRECTDRAWSURFACE4;
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
Header: Declared in ddraw.h.
Import Library: Use ddraw.lib.