LContainer::ContainerCallBack

Summary

Handles each event that occurs in the container.

Syntax

#include "Ltwrappr.h"

virtual L_INT LContainer::ContainerCallBack (nEventType, pEventData)

Parameters

CONTAINEREVENTTYPE nEventType

The type of the event sent by the container. Possible value is:

Value Meaning
CONTAINER_EVENT_TYPE_DRAW The container is now drawing.

L_VOID *pEventData

Pointer to a structure that contains data associated with the event specified in nEventType. When nEventType is CONTAINER_EVENT_TYPE_DRAW, then the pEventData must be type pCONTAINEROBJECTDATA. Keep in mind that this is a void pointer, which must be cast to the appropriate data type for the event data.

Returns

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

Required DLLs and Libraries

See Also

Functions

Example

class LuserCon :public LContainer 
 
{ 
 
protected:  
 
virtual L_INT ContainerCallBack(CONTAINEREVENTTYPE nEvenType,L_VOID *pEventData);  
 
}; 
 
L_INT LContainer_ContainerCallbackExample( LContainer &lCont )  
{ 
   L_INT nRet; 
 
   nRet = lCont.IsValid ( ); 
 
   if ( nRet == SUCCESS ) /* check the validity of container handle */ 
 
   { 
 
      /* Enables the container Callback */ 
 
      lCont.EnableContainerCallBack ( TRUE ) ;  
 
   } 
 
   else 
 
   { 
 
      return nRet ; 
 
   } 
 
   return SUCCESS ;  
 
} 
 
L_INT   LuserCon::ContainerCallBack(CONTAINEREVENTTYPE nEvenType,L_VOID *pEventData )  
 
{ 
   UNREFERENCED_PARAMETER(nEvenType); 
   UNREFERENCED_PARAMETER(pEventData); 
 
 
   //user write his code here.  
 
   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.