DirectX SDK

DirectDraw Object Types

You can think of DirectDraw as being composed of several objects that work together. This section briefly describes the objects you use when working with the DirectDraw component, organized by object type. For detailed information, see DirectDraw Essentials.

[C++]

The DirectDraw component uses the following objects:

DirectDraw object
The DirectDraw object is the heart of all DirectDraw applications. It's the first object you create, and you use it to make all other related objects. You create a DirectDraw object by calling the DirectDrawCreateEx function. DirectDraw objects expose their functionality through the IDirectDraw, IDirectDraw2, IDirectDraw4,and IDirectDraw7 interfaces. For more information, see The DirectDraw Object.
DirectDrawSurface object
The DirectDrawSurface object (casually referred to as a "surface") represents an area in memory that holds data to be displayed on the monitor as images or moved to other surfaces. You usually create a surface by calling the IDirectDraw7::CreateSurface method of the DirectDraw object with which it will be associated. DirectDrawSurface objects expose their functionality through the IDirectDrawSurface, IDirectDrawSurface2, IDirectDrawSurface3, IDirectDrawSurface4,and IDirectDrawSurface7 interfaces. For more information, see Surfaces.
DirectDrawPalette object
The DirectDrawPalette object (casually referred to as a "palette") represents a 16- or 256-color indexed palette to be used with a surface. It contains a series of indexed RGB triplets that describe colors associated with values within a surface. You do not use palettes with surfaces that use a pixel format depth greater than 8 bits. You can create a DirectDrawPalette object by calling the IDirectDraw7::CreatePalette method. DirectDrawPalette objects expose their functionality through the IDirectDrawPalette interface. For more information, see Palettes.
DirectDrawClipper object
The DirectDrawClipper object (casually referred to as a "clipper") helps you prevent blitting to certain portions of a surface or beyond the bounds of a surface. You can create a clipper by calling the IDirectDraw7::CreateClipper method. DirectDrawClipper objects expose their functionality through the IDirectDrawClipper interface. For more information, see Clippers.
DirectDrawVideoPort object
The DirectDrawVideoPort object represents video-port hardware present in some systems. This hardware allows direct access to the frame buffer without accessing the CPU or using the PCI bus. You can create a DirectDrawVideoPort object by calling a QueryInterface method for the DirectDraw object, specifying the IID_IDDVideoPortContainer reference identifier. DirectDrawVideoPort objects expose their functionality through the IDDVideoPortContainer and IDirectDrawVideoPort interfaces. For more information, see Video Ports.
[Visual Basic]

The DirectDraw component uses the following objects:

DirectDraw object
The DirectDraw object is the heart of all DirectDraw applications. It's the first object you create, and you use it to make all other related objects. You create a DirectDraw object by calling the DirectX7.DirectDrawCreate method. DirectDraw objects expose their functionality through the methods of the DirectDraw7 object. For more information, see The DirectDraw Object.
DirectDrawSurface object
The DirectDrawSurface object (casually referred to as a "surface") represents an area in memory that holds data to be displayed on the monitor as images or moved to other surfaces. You create a surface by calling the DirectDraw7.CreateSurface method of the DirectDraw object with which it will be associated. DirectDrawSurface objects expose their functionality through the methods of the DirectDrawSurface7 object. For more information, see Surfaces.
DirectDrawPalette object
The DirectDrawPalette object (casually referred to as a "palette") represents a 16- or 256-color indexed palette to be used with a surface. It contains a series of indexed RGB triplets that describe colors associated with values within a surface. You do not use palettes with surfaces that use a pixel format depth greater than 8 bits. You can create a DirectDrawPalette object by calling the DirectDraw7.CreatePalette method. DirectDrawPalette objects expose their functionality through the DirectDrawPalette interface. For more information, see Palettes.
DirectDrawClipper object
The DirectDrawClipper object (casually referred to as a "clipper") helps you prevent blitting to certain portions of a surface or beyond the bounds of a surface. You can create a clipper by calling the DirectDraw7.CreateClipper method. DirectDrawClipper objects expose their functionality through the DirectDrawClipper interface. For more information, see Clippers.