IDirectDrawSurface::SetClipper

HRESULT SetClipper(LPDIRECTDRAWCLIPPER lpDDClipper);

Attaches a DirectDrawClipper object to a DirectDrawSurface object.

·Returns DD_OK if successful, or one of the following error values otherwise:

DDERR_INVALIDOBJECT DDERR_INVALIDPARAMS

DDERR_INVALIDSURFACETYPE DDERR_NOCLIPPERATTACHED

lpDDClipper

Address of the DirectDrawClipper structure representing the DirectDrawClipper that will be attached to the DirectDrawSurface. If NULL, the current clipper will be detached.

This method is primarily used by surfaces that are being overlaid on or blitted to the primary surface. However, it can be used on any surface. Once a DirectDrawClipper has been attached and a clip list is associated with it, the clipper object will be used for the IDirectDrawSurface::Blt, IDirectDrawSurface::BltBatch, and IDirectDrawSurface::UpdateOverlay operations involving the parent DirectDrawSurface. This method can also detach a DirectDrawSurface's current clipper.