#include “BiAnno.h”
long CALLBACK AnnoObjSetProperty(INT_PTR pAnno, Anno_Prop *pProp)
Description
Sets the properties for the selected annotation object using the data in an Anno_Prop structure provided by the user.
Parameters
|
INT_PTR |
pAnno |
Annotation handle |
|
Anno_Prop* |
pProp |
Pointer to a correctly initialized Anno_Prop structure |
Anno_Prop structure:
lObjType Type of the object to be modified. This field is only relevant when retrieving information. You cannot modify the object type after creation. May take one of the following values:
A_WOUT
A_NOTE
A_STAMP
A_HIGHLIGHT
A_LINE
A_RECT
A_CIRCLE
A_ROUNDEDRECT
A_TEXT
A_FREEHAND
A_META
A_RUBBERSTAMP
A_VOICE
A_COMMENT
A_TEXTBOX
A_MULTILINETEXTBOX
A_CHECKBOX
A_DATETIME
lPosX X coordinate of the upper-left corner of the object. In case of an A_LINE type object, this field is the X coordinate of the starting point
lPosY Y coordinate of the upper-left corner of the object. In case of an A_LINE type object, this field is the Y coordinate of the starting point
lWidth Width of the object. In case of an A_LINE type object, this field is the X coordinate of the end point.
lHeight Height of the object. In case of an A_LINE type object, this field is the Y coordinate of the end point.
lColor Color of the object. May take one of the following values:
A_BLACK
A_GRAY
A_BLUE
A_RED
A_PURPLE
A_GREEN
A_LBLUE
A_YELLOW
A_LGRAY
A_WHITE
lLine_Width The width of the object outline. May be any positive integer.
lLine_Type Type of the object outline. May take one of the following values:
A_SIMPLE
A_ARROW
A_FILLED_ARROW
A_DB_ARROW
A_DB_FILLED_ARROW
lOnPage The number of the page that the object is placed on. This field is only relevant when retrieving information. This function cannot modify the page that the object is placed on after creation.
pszText Pointer to the text in the yellow sticker (A_NOTE) object. This field is only relevant when retrieving information. This function cannot modify the text in the yellow sticker object.
For A_COMMENT annotations, please use the function AnnoObjSetCommentText.
For A_NOTE annotations saved with version 12.54 or newer, please use the function AnnoObjSetNoteText.
sLogFont Font used by A_NOTE, A_TEXT, A_TEXTBOX, A_MULTILINETEXTBOX, A_DATETIME and A_COMMENT objects. The type is LOGFONTA.
lpFileName Name of the TIFF image for an A_STAMP type object. If lpFileName is not NULL, the hBitmap field is ignored.
The name of the metafile assigned for the current A_META object.
hBitmap A valid bitmap handle for an A_STAMP type object. Valid only when the lpFileName field is NULL.
lStampMode The transparency mode of an A_STAMP type object.
lOnLayer The number of the layer that the object is placed on.
bRubberStampType Rubber stamp type of the A_RUBBERSTAMP object.
bRed If lColor is undefined (-1), this specifies the red component of RGB color of the annotation object.
bGreen If lColor is undefined (-1), this specifies the green component of RGB color of the annotation object.
bBlue If lColor is undefined (-1), this specifies the blue component of RGB color of the annotation object.
LNoteTextColor Color of the text of the A_NOTE or A_COMMENT object.
lHAlign Horizontal text alignment on the A_TEXT, A_TEXTBOX, A_MULTILINETEXTBOX, A_DATETIME or A_NOTE object.
lVAlign Vertical text alignment on the A_TEXT, A_TEXTBOX, A_MULTILINETEXTBOX, A_DATETIME or A_NOTE object.
bBorder Specifies the border of the annotation object.
bOpaque Specifies the transparency of the annotation object.
byHyperlinkType Type of hyperlink in the annotation object.
pszHyperlink Pointer to hyperlink string in the annotation object.
pszVoiceFile Path and name of the wav file for A_VOICE object.
lBKColor Background color of the A_RECT, A_CIRCLE or A_ROUNDEDRECT rectangle object.
Return value
ANNO_ERR_POS Bad position.
ANNO_ERR_DIM Bad size.
ANNO_ERR_COLOR Bad color value.
ANNO_ERR_LWIDTH Bad line width value (less than zero).
ANNO_ERR_LTYPE Bad or nonexistent line type.
ANNO_ERR_STAMP Bad or nonexistent bitmap (invalid hBitmap or the TIFF image could not be loaded).
ANNO_ERR_FONT Bad or nonexistent font.
ANNO_ERR_STAMPMODE Bad stamp mode.
ANNO_ERR_RUBBERSTAMP_TYPE Bad rubber stamp type.
Programming Notes
This function is an aggregated setter function for the properties of an annotation. The user can call this function when multiple properties of an annotation need to be changed at the same time. The properties listed here can also be set using individual setter functions.
For more information on specific annotations, please see Object creation process.
Code Example
None