IDirectDrawSurface2::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:
lpDDClipper
Address of the DirectDrawClipper structure representing the DirectDrawClipper object that will be attached to the DirectDrawSurface object. If this parameter is NULL, the current DirectDrawClipper object 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. After a DirectDrawClipper object has been attached and a clip list is associated with it, the DirectDrawClipper object will be used for the IDirectDrawSurface2::Blt, IDirectDrawSurface2::BltBatch, and IDirectDrawSurface2::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.