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: November 20, 2014 @ 2:00 p.m. ET / 11:00 a.m. PT Are you wanting to target two or more platforms such as iOS, Android, and/or Windows? You are not alone. 90% of enterprises today are targeting two or more platforms. Attend this eSeminar to discover how mobile app developers can rely on one IDE to create applications across platforms and approaches (web, native, and/or hybrid), saving time, money, and effort and introducing apps to market faster. You'll learn the trade-offs for gaining long …

  • Live Event Date: October 29, 2014 @ 11:00 a.m. ET / 8:00 a.m. PT Are you interested in building a cognitive application using the power of IBM Watson? Need a platform that provides speed and ease for rapidly deploying this application? Join Chris Madison, Watson Solution Architect, as he walks through the process of building a Watson powered application on IBM Bluemix. Chris will talk about the new Watson Services just released on IBM bluemix, but more importantly he will do a step by step cognitive …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds