AnnSetROP2 method (Main Control)

Visual Basic example
Visual C++ 4.0 example

Syntax short AnnSetROP2(OLE_HANDLE hObject, short nROP2, BOOL bSelected);

Overview:  Refer to Implementing Annotations.

Remarks

(Document/Medical only) Sets the ROP code of one or more annotation objects.

AnnSetROP2 can turn a simple rectangle into a hilite-type object. This is the only way to have a hilite object that has different colors for border and interior. To do that, draw a rectangle with a thick border, choose different foreground and background colors (AnnSetForeColor method and AnnSetBackColor method), and call this method with uROP2 set to ANNROP2_AND.

AnnSetROP2 is valid only for the following object types:

ANNOBJECT_POINTER,
ANNOBJECT_ELLIPSE,
ANNOBJECT_FREEHAND,
ANNOBJECT_LINE,
ANNOBJECT_POLYGON,
ANNOBJECT_POLYLINE,
ANNOBJECT_RECT,
ANNOBJECT_AUTOMATION,
ANNOBJECT_STAMP,

Note that AnnSetROP2 and AnnSetFillMode affect each other. If you set nFillMode to ANNMODE_OPAQUE, then nROP2 cannot be ANNROP2_AND. If you set nFillMode to ANNMODE_TRANSLUCENT, then nROP2 has to be ANNROP2_AND. If you set nFillMode to ANNMODE_TRANSPARENT, nROP2 can be anything.

See Also

Elements:  AnnGetROP2 method, AnnGetFillMode method, AnnSetFillMode method, AnnSetBackColor method, AnnSetForeColor method, AnnGetSelected method, AnnSetSelected method, AnnGetTransparent method, AnnSetTransparent method

Topics:  Annotations (Document/Medical only): Object Manipulation