The IDirectDrawSurface3::SetClipper method attaches a DirectDrawClipper object to a DirectDrawSurface object.
HRESULT SetClipper(
LPDIRECTDRAWCLIPPER lpDDClipper
);
If the method succeeds, the return value is DD_OK.
If the method fails, the return value may be one of the following error values:
DDERR_INVALIDOBJECT |
DDERR_INVALIDPARAMS |
DDERR_INVALIDSURFACETYPE |
DDERR_NOCLIPPERATTACHED |
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. After a DirectDrawClipper object has been attached and a clip list is associated with it, the DirectDrawClipper object will be used for the IDirectDrawSurface3::Blt, IDirectDrawSurface3::BltBatch, and IDirectDrawSurface3::UpdateOverlay operations involving the parent DirectDrawSurface object. This method can also detach a DirectDrawSurface object's current DirectDrawClipper object.
If this method is called several times consecutively on the same surface for the same DirectDrawClipper object, the reference count for the object is incremented only once. Subsequent calls do not affect the object's reference count.
Windows NT: Use version 5.0 or later.
Windows: Use Windows 95 or later. Available as a redistributable for Windows 95.
Windows CE: Unsupported.
Header: Declared in ddraw.h.
Import Library: Use ddraw.lib.
IDirectDrawSurface3::GetClipper