L_AnnGetPredefinedMetafile

#include "l_bitmap.h"

L_LTANN_API L_INT L_AnnGetPredefinedMetafile(uType, phMetafile, pbEnhanced)

L_UINT uType;

/* constant that indicates the metafile to retrieve */

HMETAFILE *phMetafile;

/* pointer to a variable to be updated with the handle to the metafile */

L_BOOL *pbEnhanced;

/* flag that indicates whether the retrieved metafile is enhanced */

Retrieves a copy of the specified predefined metafile. This function is available in the Document/Medical Toolkits.

Parameter

Description

uType

Constant that indicates the metafile to retrieve. Possible values are:

 

Value

Meaning

 

ANNMETAFILE_APPROVED

[0] predefined metafile - APPROVED

 

ANNMETAFILE_ASSIGNED

[1] predefined metafile - ASSIGNED

 

ANNMETAFILE_CHECKED

[2] predefined metafile -CHECKED

 

ANNMETAFILE_CLATPRV

[3] predefined metafile - CLIENT ATTORNEY PRIVILEGE

 

ANNMETAFILE_COPY

[4] predefined metafile - COPY

 

ANNMETAFILE_DRAFT

[5] predefined metafile - DRAFT

 

ANNMETAFILE_EXTENDED

[6] predefined metafile - EXTENDED

 

ANNMETAFILE_FAX

[7] predefined metafile - FAX

 

ANNMETAFILE_FAXED

[8] predefined metafile - FAXED

 

ANNMETAFILE_IMPORTANT

[9] predefined metafile - IMPORTANT

 

ANNMETAFILE_INVOICE

[10] predefined metafile - INVOICE

 

ANNMETAFILE_NOTICE

[11] predefined metafile - NOTICE

 

ANNMETAFILE_OFFICIAL

[12] predefined metafile - OFFICIAL

 

ANNMETAFILE_ONFILE

[13] predefined metafile - ON FILE

 

ANNMETAFILE_PAID

[14] predefined metafile - PAID

 

ANNMETAFILE_PASSED

[15] predefined metafile - PASSED

 

ANNMETAFILE_PENDING

[16] predefined metafile - PENDING

 

ANNMETAFILE_PROCESSED

[17] predefined metafile - PROCESSED

 

ANNMETAFILE_RECEIVED

[18] predefined metafile - RECEIVED

 

ANNMETAFILE_REJECTED

[19] predefined metafile - REJECTED

 

ANNMETAFILE_RELEASE

[20] predefined metafile - RELEASE

 

ANNMETAFILE_SENT

[21] predefined metafile - SENT

 

ANNMETAFILE_SHIPPED

[22] predefined metafile - SHIPPED

 

ANNMETAFILE_TOPSECRET

[23] predefined metafile - TOP SECRET

 

ANNMETAFILE_URGENT

[24] predefined metafile - URGENT

 

ANNMETAFILE_VOID

[25] predefined metafile - VOID

 

ANNMETAFILE_HOTSPOT

[26] predefined metafile for Hotspots and Freehand hotspots.

 

ANNMETAFILE_ENCRYPTOR

[27] predefined metafile for an encrypt object in the encryptor state.

 

ANNMETAFILE_DECRYPTOR

[28] predefined metafile for an encrypt object in the decryptorstate

phMetafile

Pointer to a variable to be updated with the handle to the specified metafile.

 

pbEnhanced

Flag that indicates whether the retrieved metafile is enhanced or not. Possible values are:

 

Value

Meaning

 

TRUE

The retrieved metafile is an enhanced metafile.

 

FALSE

The retrieved metafile is a windows metafile.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

The L_AnnGetPredefinedMetafile function is valid only for the following object types:

image\sqrblit.gif Encrypt

image\sqrblit.gif Freehand Hotspot

image\sqrblit.gif Hotspot

image\sqrblit.gif Stamp (including the Rubber Stamp tools)

Use the L_AnnGetPredefinedMetafile function to get the default metafiles for these objects. To reset a metafile to its original metafile, call the L_AnnSetMetafile function and pass NULL to hMetafile. When the metafile handle is no longer needed, make sure to free it using one of the Microsoft Windows API functions (DeleteMetaFile or DeleteEnhMetaFile).

Required DLLs and Libraries

LTANN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Platforms

Windows 2000 / XP/Vista.

See Also

Functions:

L_AnnSetPredefinedMetafile, L_AnnGetMetafile, L_AnnSetMetafile, L_ScrambleBitmap, L_AnnGetEncryptOptions, L_AnnSetEncryptOptions, L_AnnEncryptApply, L_AnnGetSecondaryMetafile, L_AnnGetPredefinedBitmap, L_AnnSetPredefinedBitmap, L_AnnGetPointOptions

Topics:

Annotation Functions: Object Properties

 

Annotation Objects - Default Values

 

Annotation Objects - Automated Features

 

Implementing an Automated Annotation Program

 

Implementing a Non-automated Annotation Program

 

Obtaining Annotation Object Information

 

Using Annotation Bitmap Objects

 

Annotation Functions (Document/Medical only): Getting and Setting the Object Metafile Property

Example

//Sample for L_AnnGetPredefinedMetafile
//Replaces all stamp, hotspot, freehand hotspot object metafiles with
//with the predfined metafile for the hotspot
L_INT EXT_CALLBACK annMetaCallback2(HANNOBJECT  hObject,
                                    HMETAFILE   Metafile)
{
   L_UINT Type;

   L_AnnGetType(hObject, &Type);
   switch(Type)
   {
   case ANNOBJECT_STAMP:
   case ANNOBJECT_HOTSPOT:
   case ANNOBJECT_FREEHANDHOTSPOT:
      L_AnnSetMetafile(hObject, Metafile, ANNMETAFILE_USER, 0);
      break;
   default:
      MessageBox(NULL, TEXT("Object must be a stamp, hotspot, or freehand hotspot."), TEXT(""), MB_OK);
   }
   return SUCCESS;
}

 L_INT AnnGetPredefinedMetafileExample(HANNOBJECT hContainer)
{
   L_INT nRet;
   HMETAFILE   Metafile;
   L_BOOL      bEnhanced;

   nRet = L_AnnGetPredefinedMetafile (ANNMETAFILE_HOTSPOT, &Metafile, &bEnhanced);
   if(nRet != SUCCESS)
      return nRet;

   nRet = L_AnnEnumerate(hContainer, (ANNENUMCALLBACK) annMetaCallback2, Metafile, ANNFLAG_RECURSE | ANNFLAG_NOTCONTAINER, 0);
   if(nRet != SUCCESS)
      return nRet;

   if (!bEnhanced)
        DeleteMetaFile(Metafile);
    else
        DeleteEnhMetaFile((HENHMETAFILE)Metafile);
   return SUCCESS;
}