[id] = CopyPalette(source, dest)
source
and creates a copy of
it as palette dest
. The new palette is independent from the old palette so you
can free the source palette after it has been cloned.
If you pass Nil as dest
, CopyPalette()
will return a handle to the new
palette to you. Otherwise the new palette will use the identifier specified
in dest
.
dest
CopyPalette(1, 10) FreePalette(1)The above code creates a new palette 10 which contains the same color data as palette 1. Then it frees palette 1 because it is no longer needed.