Click here to Skip to main content
Click here to Skip to main content

Animated Dialog Windows

, 17 Apr 2000
Rate this:
Please Sign up or sign in to vote.
A class that provides some simple, yet spectacular window animation effects. Try the demo!
  • 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.

  • License

    This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

    A list of licenses authors might use can be found here

    About the Author

    Anton Stuck

    Russian Federation Russian Federation
    No Biography provided

    Comments and Discussions

     
    GeneralMy vote of 5 Pinmembersariqkhan21-Nov-12 1:29 
    GeneralIt won't work with Vista Aero Pinmemberjulio.debroy16-Oct-07 13:19 
    GeneralGreat code PinmemberEl Chapulin Colorado3-May-07 1:17 
    GeneralSIMPLY PinmemberHugo.Pereira21-Dec-06 1:25 
    GeneralHats off PinmemberBalkrishna Talele11-Dec-03 22:41 
    GeneralI bow before thy creativity Pinmemberabhinaba10-Dec-03 18:42 
    GeneralAmazing! PinsussT.S. Prasad21-Apr-03 18:04 
    GeneralI finally found this class! PinmemberiProgram (WangYue)12-Jan-03 23:26 
    GeneralThis is soooo cooool !! PinmemberWREY27-Sep-02 23:21 
    GeneralOnly one little note... PinsussAV9-Oct-00 21:34 
    GeneralRe: Only one little note... PinmemberJoephia1-Sep-08 6:33 
    Questionset position od adialog ? PinsussKhoa Vinh10-Aug-00 17:16 
    Questionset position od adialog ? PinsussKhoa Vinh10-Aug-00 17:15 
    GeneralSpeed PinsussGeorge6-May-00 7:37 
    GeneralRe: Speed Pinmembertiaozi25-May-02 2:02 
    GeneralRe: Speed Pinmemberxiangjs27-Feb-03 6:01 
    GeneralAwesome! PinsussDuc Truong26-Apr-00 14:03 
    Generalwhen ondestroy, leaves lines behind PinsussMartin18-Apr-00 18:59 
    GeneralRe: when ondestroy, leaves lines behind Pinsussflight19-Apr-00 11:41 
    GeneralRe: when ondestroy, leaves lines behind PinsussGeorge29-Apr-00 8:37 
    GeneralRe: when ondestroy, leaves lines behind PinsussSimon Brown12-May-00 0:10 
    GeneralRe: when ondestroy, leaves lines behind PinsussFuMo12-Jun-00 14:00 
    GeneralRe: when ondestroy, leaves lines behind PinsussRainer Koschnick5-Sep-00 12:34 
    General:) PinsussAlex Turc18-Apr-00 8:31 
    Questionsystem hook???? PinsussLJP18-Apr-00 5:01 
    AnswerRe: system hook???? PinsussChris Maunder18-Apr-00 12:52 
    GeneralLots of Fun PinsussScot Reed18-Apr-00 3:55 
    GeneralStunning PinsussChris Maunder18-Apr-00 3:37 
    GeneralNice Effect PinsussArlynn Smith18-Apr-00 2:52 
    GeneralGREAT! PinsussGeorge18-Apr-00 0:25 

    General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

    Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

    | Advertise | Privacy | Mobile
    Web04 | 2.8.140721.1 | Last Updated 18 Apr 2000
    Article Copyright 2000 by Anton Stuck
    Everything else Copyright © CodeProject, 1999-2014
    Terms of Service
    Layout: fixed | fluid