3.1.1 Device Independence
WMF metafiles are useful for transferring images between applications. Most applications support the clipboard format associated with metafiles, called METAFILEPICT (for more information, see [MSDN-CLIPFORM]). When treated as a single graphics primitive, a metafile is easy to paste into an application without that application needing to know the specific content of the image. An application can store a metafile in global memory or to disk.
The mapping mode of a metafile can be altered during playback. Thus, the image can be scaled arbitrarily, with every component scaling separately, which minimizes the loss of information for the image as a whole, which is not characteristic of bitmaps.
To ensure that metafiles can be transported between different computers and applications, any application that creates a metafile needs to ensure that the metafile is device independent and sizable. The following guidelines help ensure that every metafile can be accepted and manipulated by other applications:
Set the mapping mode as one of the first records. Some applications only accept metafiles that are in MM_ANISOTROPIC mode.
Set the META_SETWINDOWORG (section 188.8.131.52) and META_SETWINDOWEXT (section 184.108.40.206) records. Do not use the META_SETVIEWPORTEXT (section 220.127.116.11) or META_SETVIEWPORTORG (section 18.104.22.168) record if the user will be able to resize or change the dimensions of the object.
Do not use any of the region records, because they are device dependent.
Terminate the metafile with a META_EOF Record (section 22.214.171.124) (0x0000).