### Using a Clipper with Multiple Windows

You can use a DirectDrawClipper object to blit to multiple windows created by an application running at the normal cooperative level.

To do this, create a single DirectDraw object with a primary surface. Then, create a DirectDrawClipper object and assign it to your primary surface by calling the IDirectDrawSurface3::SetClipper method. To blit only the client area of a window, set the clipper to that window’s client area by calling the IDirectDrawClipper::SetHWnd method before blitting to the primary surface. Whenever you need to blit to another window’s client area, call the IDirectDrawClipper::SetHWnd method again with the new target window handle.

Creating multiple DirectDraw objects that blit to each others’ primary surface is not recommended. The technique described above provides an efficient and reliable way to blit to multiple client areas with a single DirectDraw object.