Skip to main content
Email Password   helpLost your password?
  • Download demo project - 24 Kb
  • Download source files - 5 Kb

    animated screen shot

    Introduction

    Often in modern GUI you can see a some sort of window or menu animation that can give a more user friendly "cool" look. Fading or sliding menus, poping dialog boxes look neat and provide visual feedback with user actions. Currently, however there is no simple way to do this under MS Windows, other than XORed lines and polygons (besides the AnimateWindow() function).

    The AnimEffect class provides quite an easy and extensible way to add animation to your code.

    Usage

    Using the class is rather simple. Just add the following code to the dialogs OnCreate and OnDestroy functions.

     AnimEffect ef;
     // exploding window effect
    
     ef.Open( rcWnd );
     // or imploding window effect
    
     ef.Close( rcWnd );
    

    You can customize the effect by calling the Setup( int iSteps, int iAfterimages, int iDelay ) member function, and change the animation type by Effect( EffectType effect ), where EffectType is :

       enum EffectType {
         Random=-1,       // default
    
         Spin=0,          
         Vortex,
         ScatterGather,
         Spike,
         Fireworks
       };
    

    Included is a simple demo project that shows a bunch of effects. Feel free to use this code.

  • You must Sign In to use this message board.
     
     
    Per page   
     FirstPrevNext
    GeneralIt won't work with Vista Aero Pin
    julio.debroy
    14:19 16 Oct '07  
    GeneralGreat code Pin
    El Chapulin Colorado
    2:17 3 May '07  
    GeneralSIMPLY Pin
    Hugo.Pereira
    2:25 21 Dec '06  
    GeneralHats off Pin
    Balkrishna Talele
    23:41 11 Dec '03  
    GeneralI bow before thy creativity Pin
    abhinaba
    19:42 10 Dec '03  
    GeneralAmazing! Pin
    T.S. Prasad
    19:04 21 Apr '03  
    GeneralI finally found this class! Pin
    iProgram (WangYue)
    0:26 13 Jan '03  
    GeneralThis is soooo cooool !! Pin
    WREY
    0:21 28 Sep '02  
    GeneralOnly one little note... Pin
    AV
    22:34 9 Oct '00  
    GeneralRe: Only one little note... Pin
    Joephia
    7:33 1 Sep '08  
    Generalset position od adialog ? Pin
    Khoa Vinh
    18:16 10 Aug '00  
    Generalset position od adialog ? Pin
    Khoa Vinh
    18:15 10 Aug '00  
    GeneralSpeed Pin
    George
    8:37 6 May '00  
    GeneralRe: Speed Pin
    tiaozi
    3:02 25 May '02  
    GeneralRe: Speed Pin
    xiangjs
    7:01 27 Feb '03  
    GeneralAwesome! Pin
    Duc Truong
    15:03 26 Apr '00  
    Generalwhen ondestroy, leaves lines behind Pin
    Martin
    19:59 18 Apr '00  
    GeneralRe: when ondestroy, leaves lines behind Pin
    flight
    12:41 19 Apr '00  
    GeneralRe: when ondestroy, leaves lines behind Pin
    George
    9:37 29 Apr '00  
    GeneralRe: when ondestroy, leaves lines behind Pin
    Simon Brown
    1:10 12 May '00  
    GeneralRe: when ondestroy, leaves lines behind Pin
    FuMo
    15:00 12 Jun '00  
    GeneralRe: when ondestroy, leaves lines behind Pin
    Rainer Koschnick
    13:34 5 Sep '00  
    General:) Pin
    Alex Turc
    9:31 18 Apr '00  
    Generalsystem hook???? Pin
    LJP
    6:01 18 Apr '00  
    GeneralRe: system hook???? Pin
    Chris Maunder
    13:52 18 Apr '00  


    Last Updated 17 Apr 2000 | Advertise | Privacy | Terms of Use | Copyright © CodeProject, 1999-2009