#include "ltwrappr.h"
L_INT LAnimationWindow::WaitForUserInput(bWait=TRUE, nIndex=ANIM_ALL_ITEMS)
L_BOOL bWait; |
flag that indicates whether playback waits for user input |
L_UINT nIndex; |
position of the bitmap list item |
Controls whether the animation playback waits for user input.
| Parameter | Description | |
| bWait | Flag that indicates whether playback waits for user input. | |
| nIndex | Position of bitmap list item. Possible values are: | |
| Value | Meaning | |
| ANIM_ALL_ITEMS | [-1] Set the delay for all items in the bitmap list | |
| >=0 | Set the delay only for the specified item | |
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Pass ANIM_ALL_ITEMS for nIndex to set this flag for all bitmap list items.
Required DLLs and Libraries
LTDIS For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
Win32, x64.
Functions: |
LAnimationWindow::LAnimationWindow, LAnimationWindow::IsWaitingForUserInput, LAnimationWindow::Load, LAnimationWindow::PlayAnimation, Class Members |
The follwing example will make even numbered bitmap items in the animation wait for user input, and then reads the new state for each item in the bitmap list.
#define MAKE_IMAGE_PATH(pFileName) TEXT("C:\\Users\\Public\\Documents\\LEADTOOLS Images\\")pFileNameL_INT LAnimationWindow_WaitForUserInputExample(HWND hWndParent){L_INT nRet;L_UINT i;LBase::LoadLibraries(LT_ALL_LEADLIB);//make sure all libraries are loadedLAnimationWindow MyAnimation;MyAnimation.SetFileName(MAKE_IMAGE_PATH(TEXT("eye.gif")));nRet = MyAnimation.Load();if (nRet==SUCCESS){MyAnimation.CreateWnd(hWndParent,0, WS_VISIBLE|WS_CHILD|WS_BORDER,0,0,300,300);//let the even items wait for user inputfor (i=0; i<MyAnimation.GetCount(); i++){if (i%2){nRet = MyAnimation.WaitForUserInput(FALSE,i);if(nRet != SUCCESS)return nRet;}else{nRet = MyAnimation.WaitForUserInput(TRUE,i);if(nRet != SUCCESS)return nRet;}}for (i=0; i<MyAnimation.GetCount(); i++){L_TCHAR szStr[255];//get current wait statewsprintf(szStr,TEXT("Bitmap[%d] Wait For User Input?: %s"),i, (MyAnimation.IsWaitingForUserInput(i)?TEXT("YES"):TEXT("NO")));MessageBox(hWndParent, szStr,TEXT("Example"), MB_OK | MB_ICONINFORMATION);}}elsereturn nRet;return SUCCESS;}
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
