Index   Commented   Search   About

Editing an Enhanced Metafile

To edit a picture stored in an enhanced metafile, an application must perform the following tasks.

  1. Use hit-testing to capture the cursor coordinates and retrieve the position of the object (line, arc, rectangle, ellipse, polygon, or irregular shape) that the user wants to alter.

  2. Convert these coordinates to logical (or world) units.

  3. Call the EnumEnhMetaFile function and examine each metafile record.

  4. Determine whether a given record corresponds to a GDI drawing function.

  5. If it does, determine whether the coordinates stored in the record correspond to the line, arc, ellipse, or other graphics element that intersects the coordinates specified by the user.

  6. Upon finding the record that corresponds to the output that the user wants to alter, erase the object on the screen that corresponds to the original record.

  7. Delete the corresponding record from the metafile, saving a pointer to its location.

  8. Permit the user to redraw or replace the object.

  9. Convert the GDI functions used to draw the new object into one or more enhanced-metafile records.

  10. Store these records in the enhanced metafile.

Related Links

Software for Delphi and C++ Builder developers
Software for Visual Studio .NET developers
Software for Visual Basic 6 developers
Delphi Tips&Tricks
MegaDetailed.NET
TMS Scripter Studio Pro components for Delphi/C++Builder

More Online Helps

Win32 Multimedia Programmer's Reference (mmedia.hlp)
OLE Programmer's Reference (ole.hlp)
Microsoft Windows Pen API Programmer's Reference (penapi.hlp)
Microsoft Windows Sockets 2 Reference (sock2.hlp)
Microsoft Windows Telephony API (TAPI) Programmer's Reference (tapi.hlp)
Unix Manual Pages

Free Tech Secrets ;) Copyright © 2008 Free Tect Secrets ;) greatis just4fun network just4fun