The GetWinMetaFileBits function converts the enhanced-format records from a metafile into Windows-format records and stores the converted records in the specified buffer.
UINT GetWinMetaFileBits(
HENHMETAFILE hemf, |
// handle to the enhanced metafile |
UINT cbBuffer, |
// buffer size |
LPBYTE lpbBuffer, |
// pointer to buffer |
INT fnMapMode, |
// mapping mode |
HDC hdcRef |
// handle of reference device context |
); |
If the function succeeds and the buffer pointer is NULL, the return value is the number of bytes required to store the converted records; if the function succeeds and the buffer pointer is a valid pointer, the return value is the size of the metafile data in bytes.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
This function converts an enhanced metafile into a Windows-format metafile so that its picture can be displayed in an application that recognizes the older format.
Windows uses the reference device context to determine the resolution of the converted metafile.
The GetWinMetaFileBits function does not invalidate the enhanced metafile handle. An application should call the DeleteEnhMetaFile function to release the handle when it is no longer needed.
Due to the limitations of the Windows-format metafile, some information can be lost in the retrieved metafile contents. For example, an original call to the PolyBezier function in the enhanced metafile may be converted into a call to the Polyline function in the Windows-format metafile, because there is no equivalent PolyBezier function in the Windows format.
Windows 3.x applications define the viewport origin and extents of a picture stored in a Windows-format metafile. As a result, the Windows-format records created by GetWinMetaFileBits do not contain the SetViewportOrgEx and SetViewportExtEx functions. However, GetWinMetaFileBits does create Windows-format records for the SetWindowExtEx and SetMapMode functions.
To create a scalable Windows-format metafile, specify MM_ANISOTROPIC as the fnMapMode parameter.
The upper-left corner of the metafile picture is always mapped to the origin of the reference device.
DeleteEnhMetaFile, PolyBezier, Polyline, SetMapMode, SetViewportOrgEx, SetViewportExtEx, SetWindowExtEx, SetWinMetaFileBits
file: /Techref/os/win/api/win32/func/src/f43_7.htm, 5KB, , updated: 2000/4/7 11:19, local time: 2024/11/25 12:44,
3.136.236.178:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://techref.massmind.org/Techref/os/win/api/win32/func/src/f43_7.htm"> GetWinMetaFileBits</A> |
Did you find what you needed? |
Welcome to massmind.org! |
Welcome to techref.massmind.org! |
.