Available in LEADTOOLS Imaging Pro, Vector, Document, and Medical Imaging toolkits. |
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: |
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; }