次の方法で共有


Losing and Restoring Surfaces (Windows Embedded CE 6.0)

1/6/2010

Starting with Windows Embedded CE 6.0, DirectDraw surfaces may be lost by changing the rotation angle (through ChangeDisplaySettingsEx) or by switching DirectDraw into excusive mode. When a DirectDraw surface is lost, many methods will return DDERR_SURFACELOST, and perform no other function. A IDirectDrawSurface::Restore should be called to reallocate surface memory and reattach it to the DirectDrawSurface object.

A single call to IDirectDrawSurface::Restore will restore a DirectDrawSurface's associated implicit surfaces. An attempt to restore an implicitly created surface will result in an error.

Note

After restoring a surface, the surface's description can change (especially lPitch and lXPitch). Applications should be sure to always use the surface description returned by a call to IDirectDrawSurface::Lock instead of keeping a copy that is used across different calls to Lock.

See Also

Concepts

Working with DirectDraw Surfaces