Microsoft Windows CE 3.0  

IDirectDrawSurface5::SetClipper

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.

The IDirectDrawSurface5::SetClippermethod attaches a clipper object to or deletes one from a surface.

HRESULT SetClipper(
LPDIRECTDRAWCLIPPER
lpDDClipper
);

Parameters

lpDDClipper
Address of the IDirectDrawClipperinterface for the DirectDrawClipper object that will be attached to the DirectDrawSurface object. If this parameter is NULL, the current DirectDrawClipper object will be detached.

Return Values

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:

Remarks

When setting a clipper to a surface for the first time, this method increments the clipper's reference count; subsequent calls do not affect the clipper's reference count. If you pass NULL as the lpDDClipperparameter, the clipper is removed from the surface, and the clipper's reference count is decremented. If you do not delete the clipper, the surface will automatically release its reference to the clipper when the surface itself is released. According to COM rules, your application is responsible for releasing any references it holds to the clipper when the object is no longer needed.

This method is mainly 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 IDirectDrawSurface5::Bltand IDirectDrawSurface5::UpdateOverlayoperations involving the parent DirectDrawSurface object. This method can also detach a DirectDrawSurface object's current DirectDrawClipper object.

Requirements

Runs on Versions Declared in Link to
Windows CE OS 2.12 or later. Version 2.12 requires DXPAK 1.0 or later. ddraw.h ddraw.lib

See Also

IDirectDrawSurface5::GetClipper