#include "ltwrappr.h"
LAnimationWindow::LAnimationWindow()
LAnimationWindow::LAnimationWindow(hWndParent, pBitmapList=NULL, bAutoAnimate=FALSE, nID=0, dwStyle=WS_VISIBLE|L_BS_CENTER|L_BS_PROCESSKEYBOARD, x=0, y=0, nCX=200, nCY=200)
HWND hWndParent; |
handle to the parent window |
LBitmapList * pBitmapList; |
pointer to an LBitmapList object |
L_BOOL bAutoAnimate; |
flag that indicates whether to automatically animate the list |
L_INT nID; |
window ID |
DWORD dwStyle; |
window style |
L_INT x; |
x coordinate of the window |
L_INT y; |
y coordinate of the window |
L_INT nCX; |
window width |
L_INT nCY; |
window height |
Constructs and initializes the different member variables of the LAnimationWindow object.
Parameter | Description | |
hWndParent | Handle to the parent window of the animation control. | |
pBitmapList | Pointer to a valid LBitmapList object to be played. The passed list will be copied to an internal member and invalidated. | |
bAutoAnimate | Flag that indicates whether to automatically animate the list. Possible values are: | |
Value | Meaning | |
TRUE | Automatically animate the list. | |
FALSE | Do not automatically animate the list. |
nID |
Window ID. This is used if the window is created as a child window. |
dwStyle |
Window style. |
x |
X coordinate of the origin of the animation window. |
y |
Y coordinate of the origin of the animation window. |
nCX |
Width of the animation window. |
nCY |
Height of the animation window. |
None.
LAnimationWindow::LAnimationWindow() is the default constructor for the LAnimationWindow class. You should stop animation playback before you destroy the object.
LAnimationWindow::LAnimationWindow(hWndParent, pBitmapList, bAutoAnimate, nID, dwStyle, x, y, nCX, nCY) sets the internal bitmap list to the passed pBitmapList. pBitmapList will be invalidated upon return.
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: |
This is an example for LAnimationWindow::LAnimationWindow():
#define MAKE_IMAGE_PATH(pFileName) TEXT("C:\\Users\\Public\\Documents\\LEADTOOLS Images\\")pFileName
L_INT LAnimationWindow_LAnimationWindowFirstExample()
{
LAnimationWindow MyAnimation;
//Constructor is called upon function entry
//...
//Use MyAnimation object
//...
//Destructor is called when the function returns
return SUCCESS;
}
//This is an example for LAnimationWindow::LAnimationWindow(hWndParent, pBitmapList, bAutoAnimate, nID, dwStyle, x, y, nCX, nCY):
L_INT LAnimationWindow_LAnimationWindowSecondExample(HWND hWndParent)
{
L_INT nRet;
LBase::LoadLibraries(LT_ALL_LEADLIB); //make sure all libraries are loaded
LBitmapList MyBitmapList; //Create a bitmaplist
nRet = MyBitmapList.Load (MAKE_IMAGE_PATH(TEXT("eye.gif")));
if (nRet==SUCCESS)
{
LAnimationWindow MyAnimation(hWndParent, /*Parent window*/
&MyBitmapList, /*Bitmaplist to assign to animation*/
TRUE, /*Auto play animation*/
0x0100, /*Child Window ID*/
WS_CHILD|WS_VISIBLE, /*Window style*/
0, /*Left position*/
0, /*Top position*/
300, /*Width*/
300/*Height*/ );
while (MyAnimation.IsPlaying())
{
if (MyAnimation.DoEvents())
break;
}
}
else
{
MessageBox(hWndParent, TEXT("Failed to load file"),TEXT("Error!"),MB_OK | MB_ICONSTOP);
return 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