次の方法で共有


Using a Clipper with Multiple Windows (Windows Embedded CE 6.0)

1/6/2010

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 IDirectDrawSurface::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.

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.

See Also

Concepts

Working with DirectDraw Clippers