L_AnnSetPredefinedMetafile

#include "l_bitmap.h"

L_LTANN_API L_INT L_AnnSetPredefinedMetafile(uType, hMetafile)

Changes a predefined metafile.

Parameters

L_UINT uType

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

Value Meaning
ANNMETAFILE_APPROVED [0] predefined metafiles - 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

HMETAFILE hMetafile

Handle to the metafile used to replace the specified predefined metafile. Passing NULL will reset the predefined metafile specified by uType to its original metafile.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

This function affects the Rubber Stamp tools, the Hotspot objects and the Freehand objects created by the Automation object. For example, if you replace the ANNMETAFILE_APPROVED default metafile with another metafile, then objects created by the automation mode when the ANNTOOL_STAMP_APPROVED tool is set will look like the new metafile.

A predefined metafile can be reset to its original metafile by passing NULL for hMetafile. For example, to reset the Hotspot and the Freehand Hotspot predefined metafiles to the original value, do the following:

L_AnnSetPredefinedMetafile(ANNMETAFILE_HOTSPOT, (HMETAFILE)NULL); 

Required DLLs and Libraries

Platforms

Win32, x64.

See Also

Functions

Topics

Example

Please note that the following TestFunction uses the GetEnhMetaFile
function which is for WIN32.

L_INT AnnSetPredefinedMetafileExample(L_VOID) 
{ 
   L_INT nRet; 
   HENHMETAFILE hClassified=NULL; 
 
   /* Get the handle to the metafile. */ 
   hClassified = GetEnhMetaFile(MAKE_IMAGE_PATH(TEXT("Ocr1.emf"))); 
   if (hClassified != NULL) 
   { 
      MessageBox(NULL, TEXT("Have metafile handle."), TEXT(""), MB_OK); 
      /* Set the ANNMETAFILE_OFFICIAL metafile to the new metafile */ 
      nRet = L_AnnSetPredefinedMetafile(ANNMETAFILE_OFFICIAL, (HMETAFILE)hClassified); 
      if(nRet != SUCCESS) 
         return nRet; 
      /* Reset the toolbar menu text */ 
      nRet = L_AnnSetAutoText(NULL, ANNAUTOTEXT_MENU_STAMP_OFFICIAL, TEXT("Classified")); 
      if(nRet != SUCCESS) 
         return nRet; 
   } 
   else 
   { 
      MessageBox(NULL, TEXT("No handle."), TEXT(""), MB_OK); 
      return ERROR_INV_HANDLE;  
   } 
 
   return SUCCESS; 
} 

Help Version 21.0.2021.4.7
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C API Help