This method of the DirectDrawSurface Class sets the color key value for the DirectDrawSurface object if the hardware supports color keys on a per surface basis.
public void setColorKey(int flags, DDColorKey val);
flags | One value of DDCKEY_ type, specifying which color key to set. |
val | A DDColorKey object that contains the new color key values for the DirectDrawSurface object. |