L_AutAddContainer

#include "ltaut.h"

L_LTAUT_API L_INT L_AutAddContainer(pAutomation, pContainer , pModeData)

Adds a new container to the automation list of containers.

Parameters

pAUTOMATIONHANDLE pAutomation

Pointer to an automation handle.

pCONTAINERHANDLE pContainer

Pointer to a container handle.

L_VOID * pModeData

Pointer to a structure that contains information about the mode used to create the specified automation handle. If the automation handle was created using AUTOMATION_MODE_VECTOR, pModeData_should point to a VECTORHANDLE structure. If the automation handle was created using AUTOMATION_MODE_PAINT, pModeData should point to a CONTAINERPAINTDATA structure.

Returns

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

Comments

For an SDI application, usually a single container for the current SDI window will be added. For an MDI application, usually a new container will be added every time a new MDI child window is created.

The newly added container will become the active automation container.

Adding a new container will provide all automation functionality to the window that owns the newly added container.

To remove a container from the automation list of containers, call L_AutRemoveContainer.

Required DLLs and Libraries

See Also

Functions

Topics

Example

This example shows how to create and add a new container when the current automation mode is AUTOMATION_MODE_VECTOR.

L_INT AutAddContainerExample(HWND hWndOwner, 
   pAUTOMATIONHANDLE * ppAutomation, 
   pCONTAINERHANDLE * ppContainer, 
   pVECTORHANDLE      pVector) 
{ 
   L_INT nRet = SUCCESS; 
 
   nRet = L_AutIsValid ( *ppAutomation ); 
   if ( SUCCESS == nRet ) 
   { 
      if(*ppContainer == NULL) 
      { 
         /* initiate a new container handle */ 
         nRet = L_ContainerInit ( ppContainer ); 
         if ( SUCCESS != nRet ) 
         { 
            return nRet ; 
         } 
 
         /* create a new container */ 
         nRet = L_ContainerCreate ( *ppContainer, hWndOwner ) ; 
         if ( SUCCESS != nRet ) 
         { 
            return nRet ; 
         } 
 
         /* add the new container to the vector automation */ 
         nRet = L_AutAddContainer ( *ppAutomation, *ppContainer, pVector) ; 
         if(nRet != SUCCESS) 
            return nRet; 
 
         return SUCCESS ; 
      } 
   } 
 
   return nRet ; 
} 

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 API Help