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

  • Live Event Date: April 22, 2014 @ 1:00 p.m. ET / 10:00 a.m. PT Database professionals — whether developers or DBAs — can often save valuable time by learning to get the most from their new or existing productivity tools. Whether you're responsible for managing database projects, performing database health checks and reporting, analyzing code, or measuring software engineering metrics, it's likely you're not taking advantage of some of the lesser-known features of Toad from Dell. Attend this live …

  • With JRebel, developers get to see their code changes immediately, fine-tune their code with incremental changes, debug, explore and deploy their code with ease (both locally and remotely), and ultimately spend more time coding instead of waiting for the dreaded application redeploy to finish. Every time a developer tests a code change it takes minutes to build and deploy the application. JRebel keeps the app server running at all times, so testing is instantaneous and interactive.

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds