13.07.2015 Views

REFERENCE GUIDE

REFERENCE GUIDE

REFERENCE GUIDE

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Deleting ametafileAn application frees the memory which Windows uses to storethe metafile by calling the DeleteMetafile function. This functionremoves a metafile from memory and invalidates its handle. It hasno effect on disk files.Changing howWindows plays ametafileChapter 9, "File formats," inReference, Volume 2, showsthe formats of the variousmetafile records anddescribes their contents.See the description of theHANDLETABLE data structurein Chapter 7, "Data typesand structures," in Reference,Volume 2, for info on thehandle table format.Printer-control functionsA metafile does not have to be played back in its entirety orexactly in the form in which it was recorded. An application canuse the EnumMetaFile function to locate a specific metafile record.EnumMetaFile calls an application-supplied callback function andpasses it the following:IJ The metafile device contextIJ A pointer to the metafile handle tableIJ A pointer to a metafile recordIJ The number of associated objects with handles in the handletableIJ A pointer to application-supplied dataThe callback function can then use this information to playasingle record, to query it, copy it, or modify it. ThePlayMetaFileRecord function plays a single metafile record.When Windows plays or enumerates the records in a metafile, itidentifies each object with an index into a handle table. Functionsthat select objects (such as SelectObject and SelectPalette)identify the object by means of the object handle which theapplication passes to the function.Objects are added to the table in the order in which they arecreated. For example, if a brush is the first object created in ametafile, the brush is given index zero. If the second object is apen, it is given index 1, and so on.Printer-control functions retrieve information about a printer andmodify its initialization state. The printer driver, rather than GDIitself, provides these functions. The following list briefly describeseach printer-control function:Chapter 2, Graphics device interface functions 127

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!