LAnimationWindow::LAnimationWindow

#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)

Constructs and initializes the different member variables of the LAnimationWindow object.

Parameters

HWND hWndParent

Handle to the parent window of the animation control.

LBitmapList * pBitmapList

Pointer to a valid LBitmapList object to be played. The passed list will be copied to an internal member and invalidated.

L_BOOL 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.

 

L_INT nID

Window ID. This is used if the window is created as a child window.

DWORD dwStyle

Window style.

L_INT x

X coordinate of the origin of the animation window.

L_INT y

Y coordinate of the origin of the animation window.

L_INT nCX

Width of the animation window.

L_INT nCY

Height of the animation window.

Returns

None.

Comments

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

Platforms

Win32, x64.

See Also

Example

//This is an example for LAnimationWindow::LAnimationWindow() : 
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; 
} 
Help Version 20.0.2020.4.5
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C++ Class Library Help