LAutomation::SetActiveContainer

Summary

Sets the active automation container.

Syntax

#include "ltwrappr.h"

L_INT LAutomation::SetActiveContainer(pLContainer )

Parameters

LContainer * pLContainer

Pointer to the LContainer object that references the container to be activated.

Returns

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

Comments

The container being set must exist in the automation container list. To add a container to the automation container list, call LAutomation::AddContainer.

Required DLLs and Libraries

See Also

Functions

Topics

Example

This example shows how to set the automation active container.

L_INT LAutomation_SetActiveContainerExample(LContainer &lcon,LAutomation &lauto) 
{ 
   L_INT nRet; 
 
   nRet = lauto.IsValid (); 
 
   if ( SUCCESS == nRet ) /* check the validity of the automation handle */ 
 
   { 
 
      nRet = lcon.IsValid (); 
 
      if ( SUCCESS == nRet ) /* check the validity of the container handle */ 
 
      { 
 
         LContainer *pActiveContainer ; 
 
         /* get the current active container */ 
 
         pActiveContainer = lauto.GetActiveContainer() ; 
 
         if ( &lcon != pActiveContainer ) /* if the new container is not currently active */ 
 
         { 
 
            /* set the new active container */ 
 
            nRet = lauto.SetActiveContainer (&lcon) ; 
            if(nRet != SUCCESS) 
               return nRet; 
 
         } 
 
      } 
 
      else 
 
      { 
 
         return nRet ; 
 
      } 
 
   } 
 
   else 
 
   { 
 
      return nRet ; 
 
   } 
 
   return SUCCESS; 
 
} 

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

LEADTOOLS Container and Automation C++ Class Library Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.