IDirectDraw7 interface

Applications use the methods of the IDirectDraw7 interface to create DirectDraw objects and work with system-level variables. This section is a reference to the methods of the IDirectDraw7 interface.

Members

The IDirectDraw7 interface inherits from the IUnknown interface. IDirectDraw7 also has these types of members:

Methods

The IDirectDraw7 interface has these methods.

MethodDescription
Compact

This method is not currently implemented.

CreateClipper

Creates a DirectDrawClipper object.

CreatePalette

Creates a DirectDrawPalette object for this DirectDraw object.

CreateSurface

Creates a DirectDrawSurface object for this DirectDraw object.

DuplicateSurface

Duplicates a DirectDrawSurface object.

EnumDisplayModes

Enumerates all the display modes that the hardware exposes through the DirectDraw object and that are compatible with a provided surface description.

EnumSurfaces

Enumerates all the existing or possible surfaces that meet the specified surface description.

EvaluateMode

Used after a call to IDirectDraw7::StartModeTest to pass or fail each mode that the test presents and to step through the modes until the test is complete.

FlipToGDISurface

Makes the surface that the GDI writes to the primary surface.

GetAvailableVidMem

Retrieves the total amount of display memory available and the amount of display memory currently free for a given type of surface.

GetCaps

Retrieves the capabilities of the device driver for the hardware and the hardware emulation layer (HEL).

GetDeviceIdentifier

Obtains information about the device driver. This method can be used, with caution, to recognize specific hardware installations to implement workarounds for poor driver or chipset behavior.

GetDisplayMode

Retrieves the current display mode.

GetFourCCCodes

Retrieves the four-character codes (FOURCC) that are supported by the DirectDraw object. This method can also retrieve the number of codes that are supported.

GetGDISurface

Retrieves the DirectDrawSurface object that currently represents the surface memory that GDI is treating as the primary surface.

GetMonitorFrequency

Retrieves the frequency of the monitor that the DirectDraw object controls.

GetScanLine

Retrieves the scan line that is currently being drawn on the monitor.

GetSurfaceFromDC

Retrieves the IDirectDrawSurface7 interface for a surface, based on its GDI device context handle.

GetVerticalBlankStatus

Retrieves the status of the vertical blank.

Initialize

Initializes a DirectDraw object that was created by using the CoCreateInstance COM function.

RestoreAllSurfaces

Restores all the surfaces that were created for the DirectDraw object, in the order that they were created.

RestoreDisplayMode

Resets the mode of the display device hardware for the primary surface to what it was before the IDirectDraw7::SetDisplayMode method was called. Exclusive-level access is required to use this method.

SetCooperativeLevel

Determines the top-level behavior of the application.

SetDisplayMode

Sets the mode of the display-device hardware.

StartModeTest

Initiates a test to update the system registry with refresh rate information for the current display adapter and monitor combination. A call to this method is typically followed by calls to IDirectDraw7::EvaluateMode to pass or fail modes displayed by the test.

TestCooperativeLevel

Reports the current cooperative-level status of the DirectDraw device for a windowed or full-screen application.

WaitForVerticalBlank

Helps the application synchronize itself with the vertical-blank interval.

 

Remarks

The methods of the IDirectDraw7 interface can be organized into the following groups:

GroupMethods
Allocating memory Compact and Initialize
Cooperative levels SetCooperativeLevel and TestCooperativeLevel
Creating objects CreateClipper, CreatePalette, and CreateSurface
Device capabilities GetCaps
Display modes EnumDisplayModes, GetDisplayMode, GetMonitorFrequency, RestoreDisplayMode, SetDisplayMode, and WaitForVerticalBlank
Display status GetScanLine and GetVerticalBlankStatus
Miscellaneous EvaluateMode, GetAvailableVidMem, GetDeviceIdentifier, GetFourCCCodes, and StartModeTest
Surface management DuplicateSurface, EnumSurfaces, FlipToGDISurface, GetGDISurface, GetSurfaceFromDC, and RestoreAllSurfaces

 

The IDirectDraw7 interface extends the features of previous versions of the interface by offering methods that enable more flexible surface management than previous versions. All the surface-related methods in the IDirectDraw7 interface accept slightly different parameters than their counterparts in the IDirectDraw2 interface. Wherever an IDirectDraw2 interface method might accept a DDSURFACEDESC structure and retrieve an IDirectDrawSurface3 interface, the methods in IDirectDraw7 accept a DDSURFACEDESC2 structure and retrieve an IDirectDrawSurface7 interface, instead.

IDirectDraw7 introduces improved compliance with COM rules that dictate the lifetime of child objects.

Use the LPDIRECTDRAW, LPDIRECTDRAW2, LPDIRECTDRAW4 or LPDIRECTDRAW7 data types to declare a variable that contains a pointer to an IDirectDraw, IDirectDraw2, IDirectDraw4 or IDirectDraw7 interface. The Ddraw.h header file declares these data types with the following code:



typedef struct IDirectDraw     FAR *LPDIRECTDRAW;
typedef struct IDirectDraw2    FAR *LPDIRECTDRAW2;
typedef struct IDirectDraw4    FAR *LPDIRECTDRAW4;
typedef struct IDirectDraw7    FAR *LPDIRECTDRAW7;


Requirements

Header

Ddraw.h

Library

Ddraw.dll

 

 

Community Additions

ADD
Show:
© 2014 Microsoft