LAnnContainer::Create

#include "ltwrappr.h"

virtual L_INT LAnnContainer::Create(hWnd, pRect, bVisible=FALSE)

HWND hWnd;

/* handle to the window */

pANNRECT pRect;

/* pointer to a structure */

L_BOOL bVisible;

/* flag that indicates whether the container will be visible */

Creates and initializes an annotation object that is a container. This function is available in the Document/Medical Toolkits.

Parameter

Description

hWnd

Handle to the window for the container.

pRect

Pointer to the LEADTOOLS ANNRECT structure that specifies the container. The ANNRECT structure is like a Windows RECT structure, except that it uses double-precision floating point values.

 

Coordinates of an object's rectangle are relative to its container object. The coordinates are interpreted using the container's scaling factors and offsets, which are described in Low-Level Coordinate System for Annotations.

bVisible

Flag that indicates whether the container will be visible. Possible values are:

 

Value

Meaning

 

TRUE

The container is visible.

 

FALSE

The container is not visible.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

You should not call this function during processing of WM_LTANNEVENT if wParam equals LTANNEVENT_REMOVE or LTANNEVENT_INSERT or during the LAnnContainer::EnumerateCallBack virtual function!

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.

See Also

Functions:

Class Members, LAnnotation::AdjustPoint, LAnnContainer::Convert, LAnnotation::Define2, LAnnotation::GetRestrictToContainer, LAnnEncrypt::GetRotateAngle, LAnnContainer::HitTestExt, LAnnContainer::RestrictCursor, LAnnotation::SetRestrictToContainer

Topics:

Annotation Functions: Creating and Deleting Annotations

 

Implementing Annotations

 

Types of Annotations

 

Displaying and Manipulating Annotation Objects

Example

L_VOID TestFunction(HWND hWnd,LAnnLine& LeadAnnLine)
{
   LAnnContainer  LeadAContainer;
   ANNRECT AnnRect ;

   AnnRect.left = 30 ;
   AnnRect.top = 20 ;
   AnnRect.right = 100 ;
   AnnRect.bottom = 100 ;

   LeadAContainer.Create(hWnd,&AnnRect,TRUE) ;

   LeadAContainer.Insert(LeadAnnLine,FALSE) ;

   if (LeadAContainer.CopyFromClipboard(hWnd) == SUCCESS)
      MessageBox(hWnd,TEXT("The clipboard has annotations ..."), TEXT("Clipboard"),MB_OK) ;
}