LContainer::EditObject

#include "Ltwrappr.h"

L_INT LContainer::EditObject (pObjectData)

Displays the object specified by pObjectData and lets the user edit its properties.

Parameters

const pCONTAINEROBJECTDATA pObjectData

Pointer to the structure that contains the object data to be edited.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Required DLLs and Libraries

See Also

Functions

Topics

Example

This example shows how to edit a container object this example assumes that the container limits would be at least { 10, 10, 300, 200 }.

L_INT LContainer_EditObjectExample(LContainer* pLContainer)  
{ 
   L_INT nRet; 
 
   nRet = pLContainer ->IsValid (); 
 
   if ( nRet == SUCCESS) /* check the validity of container handle */ 
 
   { 
 
      CONTAINEROBJECTDATA   Data ; 
 
      CONTAINERPOLYLINEDATA   PolyData ; 
 
      VECTORPOINT pt [ 7 ] ; 
 
      /* Set the Polyline points to some random numbers */ 
 
      pt[0].x = 10 ;   pt[0].y = 10 ;  
 
      pt[1].x = 80 ;   pt[1].y = 20 ; 
 
      pt[2].x = 100 ; pt[2].y = 60 ;  
 
      pt[3].x = 10 ;   pt[3].y = 40 ;  
 
      pt[4].x = 100 ; pt[4].y = 200 ; 
 
      pt[5].x = 200 ; pt[5].y = 100 ; 
 
      pt[6].x = 300 ; pt[6].y = 200 ; 
 
      /* Set the container object data */ 
 
      Data.nSize  = sizeof ( CONTAINEROBJECTDATA ) ;  
 
      Data.nObjectType = CONTAINER_OBJECT_TYPE_POLYLINE ; 
 
      PolyData.pvptPoints  = pt ; 
 
      PolyData.nPointCount = 7 ; 
 
      Data.pObjectData = &PolyData;  
 
      /* Start editing an object */ 
 
      /* Double click the left-mouse button to end editing */ 
 
      /* Click right-mouse button to abort editing */ 
 
      nRet = pLContainer ->EditObject ( &Data ); 
 
      if ( SUCCESS != nRet ) 
 
      { 
 
         return nRet ; 
 
      } 
 
   } 
 
   else 
 
   { 
 
      return nRet ; 
 
   } 
 
   return SUCCESS ; 
 
} 

Help Version 20.0.2020.4.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Container and Automation C++ Class Library Help