LImageViewerCell::EnableAnimationStartedCallBack

#include "ltwrappr.h"

L_BOOL LImageViewerCell::EnableAnimationStartedCallBack(bEnable)

L_BOOL bEnable;

/* flag */

Enables or disables the LImageViewerCell::AnimationStartedCallBack function.

Parameter

Description

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.

Returns

The previous setting.

Comments

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.

Required DLLs and Libraries

LTIVW

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:

LImageViewerCell::EnableAnimationStoppedCallBack, LImageViewerCell::AnimationStartedCallBack, LImageViewerCell::AnimationStoppedCallBack, Class Members

Topics:

Image Viewer Cells

 

Image Viewer Functions: Image Viewer Cells

 

Image Viewer Functions: Callbacks

Example

This example notifies the user when the animation has started or stopped using the AtartAnimation and StopAnimation procedures.

#if defined LTV17_CONFIG
#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);
}
#else
#ifdef LImageViewerChild 
class LImageViewerChild :public LImageViewerCell
{
   virtual L_INT AnimationStartedCallBack(L_INT    nCellIndex,
                                          L_VOID * pAnimationStartedUserData);
   virtual L_INT AnimationStoppedCallBack(L_INT    nCellIndex);
};
#endif
L_INT LImageViewerChild::AnimationStartedCallBack(L_INT    nCellIndex)
{
   UNREFERENCED_PARAMETER(nCellIndex);
   MessageBox(NULL, TEXT("Animation started"), TEXT("Animation call Backs"), MB_OK);
   return SUCCESS;
}
L_INT LImageViewerChild::AnimationStoppedCallBack(L_INT    nCellIndex)
{
   UNREFERENCED_PARAMETER(nCellIndex);
   MessageBox(NULL, TEXT("Animation stopped"), TEXT("Animation call Backs"), MB_OK);
   return SUCCESS;
}
L_INT LImageViewer_AnimationCallbacksExample(LImageViewer& ImageViewer)
{
   ImageViewer.EnableAnimationStoppedCallBack(TRUE);
   ImageViewer.EnableAnimationStartedCallBack(TRUE);
   return SUCCESS;
}
L_VOID StartAnimation(LImageViewer& ImageViewer)
{
   ImageViewer.StartAnimation( 0, 0, -1, FALSE, 0);
}
L_VOID StopAnimation(LImageViewer& ImageViewer)
{
   ImageViewer.StopAnimation( 0, 0);
}
#endif // LTV17_CONFIG