DirectX SDK

Positioning Overlay Surfaces

[C++]

After initially displaying an overlay by calling the IDirectDrawSurface7::UpdateOverlay method, you can update the destination rectangle's by calling the IDirectDrawSurface7::SetOverlayPosition method.

Make sure that the positions you specify comply with any boundary alignment restrictions enforced by the hardware. For more information, see Boundary and Size Alignment. Also remember that SetOverlayPosition doesn't perform clipping for you; using coordinates that would potentially make the overlay run off the edge of the target surface will cause the method to fail, returning DDERR_INVALIDPOSITION.

[Visual Basic]

After initially displaying an overlay by calling the DirectDrawSurface7.UpdateOverlay method, you can update the destination rectangle's by calling the DirectDrawSurface7.SetOverlayPosition method.

Make sure that the positions you specify comply with any boundary alignment restrictions enforced by the hardware. For more information, see Boundary and Size Alignment. Also remember that SetOverlayPosition doesn't perform clipping for you; using coordinates that would potentially make the overlay run off the edge of the target surface will cause the method to fail, raising DDERR_INVALIDPOSITION.