DirectX SDK |
The DirectDrawSurface7.SetColorKey method sets the color key value for the DirectDrawSurface object if the hardware supports color keys on a per-surface basis.
object.SetColorKey( _ flags As CONST_DDCKEYFLAGS, _ val As DDCOLORKEY)
If the method fails, it raises an error, and Err.Number can be set to one of the following values:
DDERR_GENERIC |
DDERR_INVALIDOBJECT |
DDERR_INVALIDPARAMS |
DDERR_INVALIDSURFACETYPE |
DDERR_NOOVERLAYHW |
DDERR_NOTAOVERLAYSURFACE |
DDERR_SURFACELOST |
DDERR_UNSUPPORTED |
DDERR_WASSTILLDRAWING |
For transparent blits and overlays, set destination color on the destination surface and source color on the source surface.