CopyPalette
CopyPalette Copy palettes from other palettes and from color tables
#include <Palettes.h> Palette Manager
void CopyPalette(srcPalette, dstPalette, srcEntry, dstEntry,
dstLength);
PaletteHandle srcPalette; handle to the source palette
PaletteHandle dstPalette; handle to the destination palette
short srcEntry; start entry (min. of 0) to start copying from
short dstEntry ; entry (min. of 0) to start copying to
short dstLength ; total number of entries to be changed
CopyPalette copies entries from the source palette into the destination palette.
The copy operation begins at the values specified by the srcEntry and dstEntry
parameters, copying into as many entries as are specified by the dstLength
parameter. CopyPalette resizes the destination palette when the number of
entries after the copy operation is greater than it was before the copy operation.

Notes: CopyPalette does not call ActivatePalette, so your application is free
to change the palette a number of times without causing a series of
intermediate changes to the color environment. Your application should call
ActivatePalette after completing all palette changes.
If either of the palette handles is NIL, CopyPalette does nothing.