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.
The IDirectDraw7 interface inherits from the IUnknown interface. IDirectDraw7 also has these types of members:
The IDirectDraw7 interface has these methods.
This method is not currently implemented.
Creates a DirectDrawClipper object.
Creates a DirectDrawPalette object for this DirectDraw object.
Creates a DirectDrawSurface object for this DirectDraw object.
Duplicates a DirectDrawSurface object.
Enumerates all the display modes that the hardware exposes through the DirectDraw object and that are compatible with a provided surface description.
Enumerates all the existing or possible surfaces that meet the specified surface description.
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.
Makes the surface that the GDI writes to the primary surface.
Retrieves the total amount of display memory available and the amount of display memory currently free for a given type of surface.
Retrieves the capabilities of the device driver for the hardware and the hardware emulation layer (HEL).
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.
Retrieves the current display mode.
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.
Retrieves the DirectDrawSurface object that currently represents the surface memory that GDI is treating as the primary surface.
Retrieves the frequency of the monitor that the DirectDraw object controls.
Retrieves the scan line that is currently being drawn on the monitor.
Retrieves the IDirectDrawSurface7 interface for a surface, based on its GDI device context handle.
Retrieves the status of the vertical blank.
Initializes a DirectDraw object that was created by using the CoCreateInstance COM function.
Restores all the surfaces that were created for the DirectDraw object, in the order that they were created.
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.
Determines the top-level behavior of the application.
Sets the mode of the display-device hardware.
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.
Reports the current cooperative-level status of the DirectDraw device for a windowed or full-screen application.
Helps the application synchronize itself with the vertical-blank interval.
The methods of the IDirectDraw7 interface can be organized into the following groups:
|Allocating memory||Compact and Initialize|
|Cooperative levels||SetCooperativeLevel and TestCooperativeLevel|
|Creating objects||CreateClipper, CreatePalette, and CreateSurface|
|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;
Build date: 10/27/2012