Star Wars Credits ControlCStarWarsCtrl

This is an attempt to create a control which looks like the credits of the Star Wars movies. I've used a few simple GDI functions to establish this effect: Ellipse() for the stars in the background and StretchBlt() for scrolling text. The control is devired from CStatic.

Here is how you use this class:

  1. Insert the .h and .cpp files into your project.
  2. Add a static control into your dialog resource.
  3. Add a member variable for that static control.
  4. Modify the variable declaration.
  5. Change this:

    CStatic m_StarWarsCtrl;

    To this:

    CStarWarsCtrl m_StarWarsCtrl; 
  6. In your InitDialog message handler set the speed and add some text. Use these member functions:
  7. m_StarWarsCtrl.SetStarSpeed(30);
    m_StarWarsCtrl.SetScrollSpeed(2);
    m_StarWarsCtrl.AddTextLine("A long time ago");
    m_StarWarsCtrl.AddTextLine("");
    m_StarWarsCtrl.AddTextLine("in a galaxy far far away");
    m_StarWarsCtrl.AddTextLine("");
    m_StarWarsCtrl.AddTextLine("this application was programmed by");
    m_StarWarsCtrl.AddTextLine("");
    m_StarWarsCtrl.AddTextLine("Pablo van der Meer");
    m_StarWarsCtrl.AddTextLine("");
    

For more cool projects visit: Pablo Software Solutions.

Downloads

Download demo executable - 8 Kb
Download source - 15 Kb


Comments

  • Cool...but it doesn't work on XP...

    Posted by Legacy on 08/14/2003 12:00am

    Originally posted by: Jose Ramos

    This is actually a very cool implementation, however, when 
    
    I use it on Windows XP (using the new XP style, Manifest
    file, etc), the text is never drawn (or at least it
    doesn't display). The stars and the animation effect work
    perfect...the only problem is the text. Has anyone seen
    this yet? If anybody has a solution, can you email me or
    post here?

    Reply
  • It is sooooo cool

    Posted by Legacy on 09/05/2002 12:00am

    Originally posted by: Rob A. Fraydl

    Congratulation for this cool stuff. May be the force with you...

    Reply
  • Nice Effort

    Posted by Legacy on 08/16/2002 12:00am

    Originally posted by: Atif

    Well This is a nice effort and very good animation

    Reply
  • 10 out of 10

    Posted by Legacy on 08/14/2002 12:00am

    Originally posted by: Stephen Muires

    Te gek!

    Reply
  • Whats 'Star Wars'?

    Posted by Legacy on 08/13/2002 12:00am

    Originally posted by: TJ

    Just kidding.
    heh, heh.

    Reply
  • Kick Ass!

    Posted by Legacy on 08/09/2002 12:00am

    Originally posted by: Tim Stubbs

    Love it :) Thanks a lot for posting it here :)

    Reply
  • COOL~

    Posted by Legacy on 08/08/2002 12:00am

    Originally posted by: Franz

    I have looked for something like that for a long time.

    Reply
  • Grrrrrrrrrrrrrrreat :o)

    Posted by Legacy on 08/07/2002 12:00am

    Originally posted by: Eric

    Really nice work!!! REally COOL!!!

    Impressive...

    Eric

    Reply
Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • When it comes to desktops – physical or virtual – it's all about the applications. Cloud-hosted virtual desktops are growing fast because you get local data center-class security and 24x7 access with the complete personalization and flexibility of your own desktop. Organizations make five common mistakes when it comes to planning and implementing their application management strategy. This eBook tells you what they are and how to avoid them, and offers real-life case studies on customers who didn't let …

  • You probably have several goals for your patient portal of choice. Is "community" one of them? With a bevy of vendors offering portal solutions, it can be challenging for a hospital to know where to start. Fortunately, YourCareCommunity helps ease the decision-making process. Read this white paper to learn more. "3 Ways Clinicians can Leverage a Patient Portal to Craft a Healthcare Community" is a published document owned by www.medhost.com

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds