handle set_win_metafile_bits(unsigned size,
                             const byte* buffer,
                             handle reference,
                             const meta_picture* picture)

This function creates a memory-based, enhanced metafile from metafile data in windows format.


unsigned size

The size (in bytes) of the buffer pointed to by the next parameter.

const byte* buffer

A pointer to a buffer containing the metafile data (windows format).

handle reference

The handle of a reference device context.

const meta_picture* picture

The format of the metafile picture.



The handle of the newly created metafile or null if an error occurred.


The metafile data should be in windows format and it is converted to enhanced format.

The resolution data of the reference device context and the data in the instance of meta_picture is used to scale the picture. If the reference device context is null, the resolution data of the current output device is used. If the parameter meta_picture is null, the unit mapping mode unit::anisotropic is used to scale the picture so that it fits the entire device surface. The member metafile of the structure meta_picture is not used.