Contents Up Previous Next

wxMetaFile is-a wxObject


Not yet implemented.

A metafile is the Windows vector format. Currently, the only way of creating a Windows metafile is to close a metafile device context, and the only valid operations are to delete the metafile and to place it on the clipboard.

These functions are only available under Windows.

Example
wxMetaFile set-clipboard


Example

Below is a example of metafle, metafile device context and clipboard use. Note the way the metafile dimensions are passed to the clipboard, making use of the device context's ability to keep track of the maximum extent of drawing commands.

  (bind ?dc (make-instance (gensym*) of wxMetaFileDC))
  (if (send ?dc ok) then
   (
     ; Do some drawing
     (bind ?mf (send ?dc close))
     (if (neq ?mf nil) then
      ; Pass metafile to the clipboard
      (send ?md set-clipboard (send ?dc get-max-x) (send ?dc get-max-y))
      (send ?mf delete)
     )
   )
  )
  (send ?dc delete)

wxMetaFile set-clipboard

bool ( wxMetaFile set-clipboard long width long height)

Places the metafile on the clipboard, returning TRUE for success and FALSE for failure.

The metafile should be deleted immediately after this operation.