#include "l_bitmap.h"
L_LTANN_API L_INT L_AnnSetMetafile(hObject, hMetafile, uType, uFlags)
Sets the metafile for an object that uses a metafile.
Handle to the annotation object.
Handle to a metafile.
Constant that indicates the metafile to set. Possible values are:
Value | Meaning |
---|---|
ANNMETAFILE_USER | [0x7FFF] user-defined metafiles |
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 |
Flags that determine which objects to process. Most of the flags apply only to container objects. You can combine values when appropriate by using a bitwise OR ( | ). The following are valid values:
Value | Meaning |
---|---|
0 | Process only the specified object. |
ANNFLAG_SELECTED | [0x0001] Process only objects that have the selected property set to TRUE. For getting and setting the selected property, use the L_AnnGetSelected and L_AnnSetSelected functions. |
ANNFLAG_NOTTHIS | [0x0004] Process only one level of objects within the specified container, not the container itself. If there are containers within the container, they are modified, but the objects within them are not. |
ANNFLAG_RECURSE | [0x0008] Process objects within a container, and within any subcontainers, down to any level. |
ANNFLAG_NOTCONTAINER | [0x0002] (Used with ANNFLAG_RECURSE) Process objects within containers, not the containers themselves. |
ANNFLAG_NOINVALIDATE | [0x0010] Do not invalidate the affected rectangle in the window. Use this to avoid generating unwanted paint messages. |
ANNFLAG_CHECKMENU | [0x0020] Process objects only if the ANNAUTOTEXT_MENU_METAFILE menu item has been selected. |
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
The L_AnnSetMetafile function is valid only for the following object types:
If uType
== ANNMETAFILE_USER, then hMetafile
is the metafile handle. You can use any of the windows functions to create a metafile.
If uType is one of the ANNMETAFILE_XXX values, the hMetafile value is ignored and the default metafiles are used instead. The annotation DLL has 28 predefined metafiles. You can change the predefined metafiles by using the L_AnnSetPredefinedMetafile function.
The Stamp object (which includes the Rubber Stamp tools) can display text, a bitmap or a metafile. Only one of these three can be displayed at any timesetting the object to one of these destroys any settings for the other two.
Initially, the 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.
Calling the L_AnnSetMetafile function 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, call the L_AnnSetPredefinedMetafile function.
Call the L_AnnGetMetafile function to retrieve a metafile for an object.
Required DLLs and Libraries
Win32, x64.
For an example, refer to L_AnnGetPredefinedMetafile.
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document