L_INT LAnimationWindow::WaitForUserInput(bWait=TRUE, nIndex=ANIM_ALL_ITEMS)
Controls whether the animation playback waits for user input.
Flag that indicates whether playback waits for user input.
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 |
Value | Meaning |
---|---|
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.
Win32, x64.
The following 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.
L_INT LAnimationWindow_WaitForUserInputExample(HWND hWndParent)
{
L_INT nRet;
L_UINT i;
LBase::LoadLibraries(LT_ALL_LEADLIB);
//make sure all libraries are loaded
LAnimationWindow 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 input
for (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 state
wsprintf(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);
}
}
else
return nRet;
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
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.