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

This class aggregates an IDirectDrawSurfaceinterface.

Although DirectDraw interfaces ( IDirectDrawand IDirectDrawSurface) potentially can be aggregated, this feature is not yet implemented.

Various parts of DirectShow require aggregation of the DirectDraw interfaces. In particular, the video renderer passes out media samples that expose IDirectDrawand IDirectDrawSurface. This class and the CAggDirectDraw Classclass republish the methods of the DirectDraw class so that they can be aggregated.

Each member function in this class, with the exception of the constructor, CAggDrawSurface::SetDirectDrawSurface, and CAggDrawSurface::NonDelegatingQueryInterface, simply calls the corresponding method on the IDirectDrawSurfaceinterface with the parameters passed to it.

Protected Data Members

Member Description

m_pDirectDrawSurface

DirectDraw surface.

Member Functions

Member function Description

CAggDrawSurface::CAggDrawSurface

Constructs a CAggDrawSurfaceobject.

CAggDrawSurface::SetDirectDrawSurface

Sets the DirectDraw object to be aggregated by this class.

This must be called before IDirectDrawSurfaceinterface methods can be called.

Overrideable Member Functions

Member function Description

CAggDrawSurface::NonDelegatingQueryInterface

Retrieves an interface and increments the reference count.

Implemented IDirectDrawSurface Methods

Method Description

IDirectDrawSurface::AddOverlayDirtyRect

Not implemented.

IDirectDrawSurface::Blt

Performs a bit-block transfer.

IDirectDrawSurface::EnumAttachedSurfaces

Enumerates all the surfaces attached to a given surface.

IDirectDrawSurface::EnumOverlayZOrders

Enumerates the overlays on the specified destination. The overlays can be enumerated in front-to-back or back-to-front order.

IDirectDrawSurface::Flip

Makes the surface memory associated with the DDSCAPS_BACKBUFFER surface become associated with the FRONTBUFFER surface.

IDirectDrawSurface::GetBltStatus

Retrieves the status of a bit block transfer.

IDirectDrawSurface::GetCaps

Retrieves the capabilities of the surface.

IDirectDrawSurface::GetClipper

Retrieves the DirectDrawClipper object associated with this surface.

IDirectDrawSurface::GetColorKey

Retrieves the color key value for the DirectDrawSurface object.

IDirectDrawSurface::GetDC

Creates a GDI-compatible hDC for the surface.

IDirectDrawSurface::GetFlipStatus

Returns OK if the surface that it is called on has finished its flipping process; otherwise, returns DDERR_WASSTILLDRAWING.

IDirectDrawSurface::GetOverlayPosition

Retrieves the display coordinates of the surface, given a visible, active overlay surface (DDSCAPS_OVERLAY set).

IDirectDrawSurface::GetPalette

Retrieves the DirectDrawPalette structure associated with this surface.

IDirectDrawSurface::GetPixelFormat

Retrieves the color and pixel format of the surface.

IDirectDrawSurface::GetSurfaceDesc

Retrieves a DDSURFACEDESCstructure describing the surface in its current condition.

IDirectDrawSurface::IsLost

Determines if the surface memory associated with a DirectDrawSurface object has been freed.

IDirectDrawSurface::Lock

Obtains a valid pointer to the surface memory.

IDirectDrawSurface::ReleaseDC

Releases a GDI-compatible hDC previously obtained through CAggDrawSurface::GetDC.

IDirectDrawSurface::Restore

Restores a surface that has been "lost." The surface memory associated with the DirectDrawSurface object has been freed.

IDirectDrawSurface::SetClipper

Attaches a DirectDrawClipper object to a DirectDrawSurface object.

IDirectDrawSurface::SetColorKey

Sets the color key value for the DirectDrawSurface object if the hardware supports color keys on a per-surface basis.

IDirectDrawSurface::SetOverlayPosition

Changes the display coordinates of an overlay surface.

IDirectDrawSurface::SetPalette

Not supported.

IDirectDrawSurface::Unlock

Notifies DirectDraw that the direct surface manipulations are complete.

IDirectDrawSurface::UpdateOverlay

Repositions and/or modifies the visual attributes of an overlay surface. These surfaces must have the DDSCAPS_OVERLAY bit set.

IDirectDrawSurface::UpdateOverlayZOrder

Sets an overlay's z-order.

The z-order determines which overlay should be occluded when multiple overlays are displayed simultaneously.

Requirements

Header ddraw.h
Windows Embedded CE Windows CE 2.12 and later
Windows Mobile Windows Mobile Version 5.0 and later
Note Microsoft DirectShow applications and DirectShow filters have different include file and Library requirements
For more information, see Setting Up the Build Environment