Enables or disables animation looping. If animation loop is enabled, animation playback will continuously loop through the items in the associated bitmap list.
#include "ltwrappr.h"
L_BOOL LAnimationWindow::EnableLoop(bEnableLoop=TRUE)
Flag that indicates whether to enable animation looping. Possible values are:
Value | Meaning |
---|---|
TRUE | Enable animation looping. |
FALSE | Disable animation looping. |
The previous state.
The setting for auto loop overrides this setting.
If auto loop is enabled, this function will have no effect.
If auto loop is disabled, then you can use this function to enable or disable animation playback looping for the class object.
Win32, x64.
L_INT LAnimationWindow_EnableLoopExample(HWND hWndParent)
{
L_INT nRet;
LBase::LoadLibraries(LT_ALL_LEADLIB); //make sure all libraries are loaded
LAnimationWindow MyAnimation;
//Set auto loop to TRUE
MyAnimation.EnableLoop();
MyAnimation.SetFileName(MAKE_IMAGE_PATH(TEXT("eye.gif")));
nRet = MyAnimation.Load();
if (nRet!=SUCCESS)
{
MessageBox(hWndParent, TEXT("Error loading file!"),TEXT("Sample"), MB_OK|MB_ICONSTOP);
return nRet;
}
MyAnimation.CreateWnd(hWndParent,0, WS_VISIBLE|WS_CHILD|WS_BORDER,0,0,300,300);
nRet = MyAnimation.PlayAnimation();
if(nRet != SUCCESS)
return nRet;
while (MyAnimation.IsPlaying())
{
L_BOOL bCanceled;
L_BOOL bQuit = MyAnimation.DoEvents(&bCanceled);
if (bCanceled || bQuit)
{
MyAnimation.StopAnimation();
break;
}
}
return SUCCESS;
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document