Enables or disables the LImageViewerCell::AnimationStartedCallBack function.
#include "ltwrappr.h"
L_BOOL LImageViewerCell::EnableAnimationStartedCallBack(bEnable)
Flag that indicates whether to enable or disable the LImageViewerCell::AnimationStartedCallBack function. Possible values are:
Value | Meaning |
---|---|
TRUE | Enable the LImageViewerCell::AnimationStartedCallBack function. |
FALSE | Disable the LImageViewerCell::AnimationStartedCallBack function. |
The previous setting.
Call this function to enable or disable the Animation Started callback overridable function for your class object. This will enable or disable the callback functions, which exist in the calling object.
This example notifies the user when the animation has started or stopped using the AtartAnimation and StopAnimation procedures.
#ifdef LImageViewerChild
class LImageViewerChild :public LImageViewerCell
{
virtual L_INT AnimationStartedCallBack(HWND hCellWnd,L_INT nCellIndex);
virtual L_INT AnimationStoppedCallBack(HWND hCellWnd,L_INT nCellIndex);
};
#endif
L_INT LImageViewerChild::AnimationStartedCallBack(HWND hCellWnd, L_INT nCellIndex)
{
UNREFERENCED_PARAMETER(nCellIndex);
UNREFERENCED_PARAMETER(hCellWnd);
MessageBox(NULL, TEXT("Animation started"), TEXT("Animation call Backs"), MB_OK);
return SUCCESS;
}
L_INT LImageViewerChild::AnimationStoppedCallBack(HWND hCellWnd, L_INT nCellIndex)
{
UNREFERENCED_PARAMETER(hCellWnd);
UNREFERENCED_PARAMETER(nCellIndex);
MessageBox(NULL, TEXT("Animation stopped"), TEXT("Animation call Backs"), MB_OK);
return SUCCESS;
}
L_INT LImageViewer_AnimationCallbacksExample(LImageViewerCell& ImageViewerCell)
{
ImageViewerCell.EnableAnimationStoppedCallBack(TRUE);
ImageViewerCell.EnableAnimationStartedCallBack(TRUE);
return SUCCESS;
}
L_VOID StartAnimation(LImageViewerCell& ImageViewerCell)
{
ImageViewerCell.StartAnimation(0, -1, FALSE, 0);
}
L_VOID StopAnimation(LImageViewerCell& ImageViewerCell)
{
ImageViewerCell.StopAnimation(0);
}