unsigned get_metafile_palette_entries(handle metafile,
                                      unsigned count,
                                      palette_entry* entries)

This function obtains entries from the optional palette of the metafile.


handle metafile

The handle of the metafile.

unsigned count

The number of entries able to be held in the array pointed to by the following parameter.

palette_entry* entries

null The function returns the number of entries in the palette.
Other A pointer to a buffer to hold the array of palette entries.



error_return::graphics The call failed.
Zero The metafile does not contain a color palette.
Other The number of palette entries returned or the number of entries in the palette.


after using this function to obtain the palette data, a color palette may then be

  1. created,
  2. updated,
  3. selected and
  4. realized.

This will ensure that the original colors are used when the metafile is played into the device context.