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. |
Applications use the methods of the IDirectDrawSurface5interface to create DirectDrawSurface objects and work with system-level variables. This section is a reference to the methods of this interface.
IDirectDraw4::CreateSurfacewill return a fully supported IDirectDrawSurface4interface pointer. You cannot obtain the IDirectDrawSurface5interface directly from CreateSurface;use the QueryInterfacemethod to retrieve it. Also note that IDirectDrawSurface5is identical to IDirectDrawSurface4with the exception of the AlphaBltmethod. The behavior of all other methods is exactly the same, with the obvious parameter changes, LPDIRECTDRAWSURFACE5in place of LPDIRECTDRAWSURFACE4.
The methods of the IDirectDrawSurface5interface can be organized into the following groups:
Allocating memory | Initialize |
IsLost | |
Restore | |
Attaching surfaces | AddAttachedSurface |
DeleteAttachedSurface | |
EnumAttachedSurfaces | |
GetAttachedSurface | |
Blitting | AlphaBlt |
Blt | |
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 IDirectDrawSurface5interface, like all COM interfaces, inherits the IUnknowninterface methods. The IUnknowninterface supports the following three methods:
IUnknown | AddRef |
QueryInterface | |
Release |
The IDirectDrawSurface5interface 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 IDirectDrawSurface3interface method might accept a DDSURFACEDESCstructure or an IDirectDrawSurface3interface, the methods in IDirectDrawSurface5accept a DDSURFACEDESC2structure or an IDirectDrawSurface5interface instead.
You can use the LPDIRECTDRAWSURFACE, LPDIRECTDRAWSURFACE2, LPDIRECTDRAWSURFACE3, LPDIRECTDRAWSURFACE4or LPDIRECTDRAWSURFACE5data 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; typedef struct IDirectDrawSurface5 FAR *LPDIRECTDRAWSURFACE5;
Requirements
Runs on | Versions | Declared in | Link to |
---|---|---|---|
Windows CE OS | 2.12 or later. Version 2.12 requires DXPAK 1.0 or later. | ddraw.h | ddraw.lib |