Constructs and initializes the member variables of the LAnnContainer object.


#include "ltwrappr.h"



LAnnContainer::LAnnContainer(hWnd, pRect, bVisible)


HANNOBJECT& hContainer

Handle of the associated annotation object.


Handle to the window for the container.


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.

L_BOOL bVisible

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

Value Meaning
TRUE The container is visible (although transparent).
FALSE The container is not visible.




LAnnContainer::LAnnContainer() is the default constructor for the LAnnContainer class.

LAnnContainer::LAnnContainer(hWnd, pRect, bVisible) creates the associated Container annotation object with the specified bounding rectangle and window handle.

LAnnContainer::LAnnContainer(hContainer) attaches the passed handle to the created class object. The passed handle must be a LEAD annotation object of type ANNOBJECT_CONTAINER. The passed annotation object is invalidated.

Required DLLs and Libraries


Win32, x64.

See Also


//This is an example for LAnnContainer::LAnnContainer() : 
L_INT LAnnContainer_LAnnContainerFisrtExample() 
   // this will call the default constructor and destructor when it is out of scope 
   LAnnContainer LeadAContainer ; 
   return SUCCESS; 
//This is an example for LAnnContainer::LAnnContainer(hWnd, pRect, bVisible): 
L_INT LAnnContainer_LAnnContainerSecondExample(HWND hWnd) 
   L_INT nRet; 
   ANNRECT AnnRect ; 
   AnnRect.left = 10 ; = 10 ; 
   AnnRect.right = 60 ; 
   AnnRect.bottom = 60; 
   // this will call the default constructor and destructor when it is out of scope 
   LAnnContainer LeadAContainer(hWnd,&AnnRect,TRUE) ; 
   nRet = LeadAContainer.SetUserMode(ANNUSER_RUN); 
   if(nRet != SUCCESS) 
      return nRet; 
   return SUCCESS; 
//This is an example for LAnnContainer::LAnnContainer(hContainer): 
L_INT LAnnContainerThirdExample(HANNOBJECT& hContainer) 
   // this will call the default constructor and destructor when it is out of scope 
   LAnnContainer LeadAContainer(hContainer) ; 
   return SUCCESS; 
Help Version 22.0.2023.2.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C++ Class Library Help