LContainer::ContainerCallBack

#include "Ltwrappr.h"

virtual L_INT LContainer::ContainerCallBack (nEventType, pEventData)

CONTAINEREVENTTYPE nEventType;

container event type

L_VOID *pEventData;

pointer to event specific data

Handles each event that occurs in the container.

Parameter Description
nEventType The type of the event sent by the container. Possible value is:
  Value Meaning
  CONTAINER_EVENT_TYPE_DRAW The container is now drawing.
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

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Required DLLs and Libraries

LTCON

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:

LContainer::EnableContainerCallBack

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 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Container and Automation C++ Class Library Help