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

  • Targeted attacks and advanced threats are customized to infiltrate your unique IT infrastructure, evade conventional defenses, and remain hidden while stealing your corporate data. To detect these criminal intrusions, analysts and security experts agree that organizations should deploy advanced threat protection as part of an expanded security monitoring strategy. For this comparative analysis of breach detection systems, product analysis reports and comparative analysis reports are used to create the security …

  • Java developers know that testing code changes can be a huge pain, and waiting for an application to redeploy after a code fix can take an eternity. Wouldn't it be great if you could see your code changes immediately, fine-tune, debug, explore and deploy code without waiting for ages? In this white paper, find out how that's possible with a Java plugin that drastically changes the way you develop, test and run Java applications. Discover the advantages of this plugin, and the changes you can expect to see …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds