Share via


Overview | Methods | This Package | All Packages

OverviewMethodsThis PackageAll Packages

Metafile.destroyHandle

Called when this object is going to destroy its Win32 handle.

Syntax

protected void destroyHandle(inthandle**)**

Parameters

handle

The Win32 handle (HMETAFILE) to the metafile on which this object is based.

Remarks

The Metafile class' implementation of destroyHandle frees only handles owned by the Metafile object. If you have used the object to retrieve a copy of the handle to this metafile (using the copyHandle method), or if you have created a Metafile object based on a previously allocated handle, this handle is not freed by the object's call to destroyHandle; you are responsible for freeing these handles.

However, you can override this method in your Metafile-derived class to define your own custom semantics for handle creation and destruction.

If the Metafile object does not own the handle to this metafile, this method does nothing.