HGLOBAL SetMetaFileBitsBetter(hmf) | |||||
HMETAFILE hmf; | /* handle of the metafile | */ |
The SetMetaFileBitsBetter function creates a memory metafile from the data in the specified global-memory object.
hmf
Identifies the global-memory object that contains the metafile data. The object must have been created by a previous call to the GetMetaFileBits function.
The return value is the handle of a memory metafile, if the function is successful. Otherwise, the return value is NULL.
The global-memory handle returned by SetMetaFileBitsBetter is owned by GDI, not by the application. This enables applications that use metafiles to support object linking and embedding (OLE) to use metafiles that persist beyond the termination of the application. An OLE application should always use SetMetaFileBitsBetter instead of the SetMetaFileBits function.
After the SetMetaFileBitsBetter function returns, the metafile handle returned by the function should be used to refer to the metafile, instead of the handle identified by the hmf parameter.