AnnSetMetafile method (Annotation Control)

C++ Builder example

Delphi example

 

Builder Syntax

int AnnSetMetafile(HANNOBJECT hObject, unsigned &hFile, int nType, bool bSelected)

Delphi Syntax

Function AnnSetMetafile(hObject: HANNOBJECT; var hFile: HMETAFILE; nType: L_INT; bSelected: Boolean): L_INT

Overview

Refer to Implementing Annotations.

Remarks

(Document/Medical only) Sets the metafile for an object that uses a metafile.

If nType == ANNMETAFILE_USER, the hFile value is the metafile handle. Metafiles can be created by using common Microsoft Windows GDI drawing functions.

If nType is one of the ANNMETAFILE_XXX values, the hFile value is ignored and the default metafiles are used instead. The annotation DLL has 28 predefined metafiles. Change the predefined metafiles by using the AnnSetPredefinedMetafile method.

The AnnSetMetafile method is valid only for the following object types:

ANNOBJECT_ENCRYPT

ANNOBJECT_FREEHANDHOTSPOT

ANNOBJECT_HOTSPOT

ANNOBJECT_STAMP

The ANNOBJECT_STAMP objects (which include the Rubber Stamp tools) can display text, a bitmap or a metafile. Only one of these three can be displayed at any time—setting the object to one of these destroys any settings for the other two.

Initially, the ANNOBJECT_STAMP object displays text. The difference between the Stamp and the Rubber Stamp is that initially whereas the Stamp does not display an image, the Rubber Stamp tools are set to display different metafiles (one for each rubber stamp selection). Initially, the Hotspot, Freehand Hotspot, and Encrypt objects are also set to display predefined metafiles.

Using the AnnSetMetafile method changes the metafile for the selected objects. Any new objects will still get the default metafile. To change the default metafiles for newly created objects that use metafiles, use the AnnSetPredefinedMetafile method.

Use the AnnGetMetafile method to retrieve a metafile for an object.

See Also

Elements:

AnnSetMetafile method, AnnSetPredefinedMetafile method, AnnGetPredefinedMetafile method, AnnGetEncryptOptions method, AnnSetEncryptOptions method, AnnEncryptApply method, AnnGetSecondaryMetafile method, AnnPredefinedBitmap property, AnnGetPointOptions method, AnnEncryptOptions property, AnnSetBitmap method, AnnSetSecondaryBitmap method, AnnGetSecondaryBitmap method, EncryptBitmap property, AnnPointOptions property, PointUseBitmap property, PointBitmap property

Topics:

Annotations (Document/Medical only): Object Bitmap

 

Using Annotation Object Bitmaps

 

Altering Annotation Object Settings