Handles each event that occurs in the container.
#include "Ltwrappr.h"
virtual L_INT LContainer::ContainerCallBack (nEventType, pEventData)
The type of the event sent by the container. Possible value is:
Value | Meaning |
---|---|
CONTAINER_EVENT_TYPE_DRAW | The container is now drawing. |
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.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
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;
}