Adds a new container to the automation list of containers.
#include "ltaut.h"
L_LTAUT_API L_INT L_AutAddContainer(pAutomation, pContainer , pModeData)
Pointer to an automation handle.
Pointer to a container handle.
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.
| Value | Meaning |
|---|---|
| SUCCESS | The function was successful. |
| < 1 | An error occurred. Refer to Return Codes. |
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.
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 ;}