Just a comment on the tutorial. Clippers are only required if running in windowed mode.

An alternative on using clippers is the following code. This is taken straight from my own DirectDraw7 component.[pascal] { Create and attach clipper to the primary surface. }
FDirectDraw.CreateClipper(0, FClipper, nil);
FClipper.SetHWnd(0, FWindowHandle);
FPrimarySurface.Surface.SetClipper(FClipper);
[/pascal]This just creates a clipper for the entire window in three easy steps. Of course, you should check return values of those calls. To remove the clipper, the following code does the trick.[pascal] FBackSurface.ReleaseSurface;
{ Release the clipper if it exists. }
if Assigned(FClipper) then
begin
FPrimarySurface.Surface.SetClipper(nil);
FClipper := nil;
end;
FPrimarySurface.ReleaseSurface;
[/pascal]