Platform SDK: DirectX |
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 IDirectDrawSurface7::SetClipper method. To blit only to 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.
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 DirectDrawSurface7.SetClipper method. To blit only to the client area of a window, set the clipper to that window's client area by calling the DirectDrawClipper.SetHWnd method before blitting to the primary surface. Whenever you need to blit to another window's client area, call the DirectDrawClipper.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 just described provides an efficient and reliable way to blit to multiple client areas with a single DirectDraw object.