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: December 11, 2014 @ 1:00 p.m. ET / 10:00 a.m. PT Market pressures to move more quickly and develop innovative applications are forcing organizations to rethink how they develop and release applications. The combination of public clouds and physical back-end infrastructures are a means to get applications out faster. However, these hybrid solutions complicate DevOps adoption, with application delivery pipelines that span across complex hybrid cloud and non-cloud environments. Check out this …

  • CentreCorp is a fully integrated and diversified property management and real estate service company, specializing in the "shopping center" segment, and is one of the premier retail service providers in North America. Company executives travel a great deal, carrying a number of traveling laptops with critical current business data, and no easy way to back up to the network outside the office. Read this case study to learn how CentreCorp implemented a suite of business continuity services that included …

Most Popular Programming Stories

More for Developers

RSS Feeds