Available in LEADTOOLS Imaging Pro, Vector, Document, and Medical Imaging toolkits. |
L_AutAddContainer
#include "ltaut.h"
L_LTAUT_API L_INT L_AutAddContainer(pAutomation, pContainer , pModeData)
pAUTOMATIONHANDLE pAutomation ; |
/* pointer to an automation handle */ |
pCONTAINERHANDLE pContainer ; |
/* pointer to a container handle */ |
L_VOID * pModeData ; |
/* pointer to additional data */ |
Adds a new container to the automation list of containers.
Parameter |
Description |
pAutomation |
Pointer to an automation handle. |
pContainer |
Pointer to a container handle. |
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 VECTORHANDLEstructure. If the automation handle was created using AUTOMATION_MODE_PAINT, pModeData should point to a CONTAINERPAINTDATA structure. |
Returns
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
LTAUT For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application |
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; nRet = L_AutIsValid ( *ppAutomation ); if ( SUCCESS == nRet ) { /* 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 ; } else { return nRet ; } }