|
Overview |
|
|
|
Group |
|
|
|
Quick Info
Windows NT
| Yes
| Win95
| Yes
| Win32s
| No
| Import Library
| gdi32.lib
| Header File
| wingdi.h
| Unicode
| No
| Platform Notes
| None
|
|
|
GetWinMetaFileBits
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
| );
|
|
Parameters
hemf
Identifies the enhanced metafile.
cbBuffer
Specifies the size, in bytes, of the buffer into which the converted records
are to be copied.
lpbBuffer
Points to the buffer into which the converted records are to be copied. If lpbBuffer is NULL, GetWinMetaFileBits returns the the number of bytes required to store the converted metafile
records.
fnMapMode
Specifies the mapping mode to use in the converted metafile.
hdcRef
Identifies the reference device context.
Return Values
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.
Remarks
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.
See Also
DeleteEnhMetaFile, PolyBezier, Polyline, SetMapMode, SetViewportOrgEx, SetViewportExtEx, SetWindowExtEx, SetWinMetaFileBits
| Last news from Greatis Software |
 |
|
Nostalgia .Net |
|
.Net is powerful, but not all-powerful, so sometimes we need to use Win32 API for our .Net applications. It's simple enough with Platform Invoke if you have Win32 skill, but we do not always have time to dig the ancient documentation, declare the special types that are compatible with Win32, find the values of the Win32's constants and so on. Nostalgia .Net offers several simple-to-use classes, and components that will allow you to forget about the headache of Win32 and just use the power of Win32 in your application the same way as you use the native. Net classes. More » |
| Recommended software for developers |
 |
|
Ultimate Pack |
|
Component pack for Delphi and C++ Builder that contains runtime form designer, runtime object inspector, print suite and much more for the very special price. More » |
 |
|
Form Designer .Net |
|
Unique runtime form design solution that allows to edit any form in .Net WinForms application at runtime with full source codes for only 300 euro! More » |
 |
|
Print Suite .Net |
|
Print Suite .Net is a set of components for easy printing texts, images and grids from your WinForms applications. Full C# source codes are available More » |
 |
|
Gradient Controls .Net |
|
Gradient Controls .Net offers controls with gradient background feature. Labels, panels and so on... Full C# source codes are available More » |
 |
|
Greatis iGrid |
|
iGrid plots drawing grid right over your desktop, so you can use it everywhere, with any drawing application without any special plugins for different graphic editors. More » |
All the contacts and projectsDmitry Vasiliev (just.dmitry)
Related LinksSoftware for Visual Studio .NET developers Software for Delphi and C++ Builder developers Software for Visual Basic 6 developers Delphi Tips&Tricks MegaDetailed.NET More Online Helps Win32 Programmer's Reference Win32 Multimedia Programmer's Reference OLE Programmer's Reference Microsoft Windows Pen API Programmer's Reference Microsoft Windows Sockets 2 Reference Microsoft Windows Telephony API (TAPI) Programmer's Reference Unix Manual Pages
|