|This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.|
To display an overlay surface, you call the overlay surface's IDirectDrawSurface5::UpdateOverlaymethod, specifying the DDOVER_SHOW flag in the dwFlagsparameter. The method requires you to specify a source and destination rectangle in the lpSrcRectand lpDestRectparameters. The source rectangle describes a rectangle on the overlay surface that will be visible on the primary surface. To request that the method use the entire surface, set the lpSrcRectparameter to NULL. The destination rectangle describes a portion of the primary surface on which the overlay surface will be displayed.
Source and destination rectangles do not need to be the same size. You can often specify a destination rectangle smaller or larger than the source rectangle, and the hardware will shrink or stretch the overlay appropriately when it is displayed.
To successfully display an overlay surface, you might need to adjust the size and position of both rectangles. Whether this is necessary depends on the restrictions imposed by the device driver. For more information, see Boundary and Size Alignmentand Minimum and Maximum Stretch Factors.
Last updated on Tuesday, May 18, 2004