Click here to Skip to main content
Licence 
First Posted 17 Jul 2002
Views 166,403
Bookmarked 65 times

CStarWarsCtrl - Star Wars Credits Control

By | 17 Jul 2002 | Article
This is an attempt to create a control which looks like the credits of the Star Wars movies.

Sample Image

Description

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

Usage

To use the class in your application you need to do the following:

  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. Initialize the eventsink
  5. Modify the variable declaration.

  6. Change this:
    CStatic m_StarWarsCtrl; 
    To this:
    CStarWarsCtrl m_StarWarsCtrl; 
  7. In your InitDialog message handler set the speed and add some text. Use these member functions:
  8. 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("");

Contacting the Author

Please send any comments or bug reports to me via email. For any updates to this article, check my site here.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Pablo van der Meer

Web Developer

Netherlands Netherlands

Member



Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralGreat !!! Pinmember4you1:11 17 Feb '05  
GeneralA bug report and modify way PinmemberZhaolei14:14 13 Jan '05  
GeneralRe: A bug report and modify way Pinmembery_yy200817:48 20 Dec '08  
GeneralKillTimer PinmemberAlex Evans22:14 8 Jul '04  
Generalbetter fade out without space bending Pinmemberbotsjeh23:47 21 Aug '03  
GeneralStalling bug detected PinmemberEmcee Lam10:06 18 Oct '02  
GeneralRe: Stalling bug detected Pinmembersanghyun yi15:15 18 May '03  
GeneralRe: Stalling bug detected PinmemberAdam Wimsatt11:18 28 Oct '03  
GeneralGREAT! PinsussAnonymous1:00 30 Jul '02  
GeneralWould be better in OpenGL Pinmembera.r.f.17:58 28 Jul '02  
GeneralRe: Would be better in OpenGL Pinmembervsoft12:31 11 Aug '02  
QuestionAny port to C#? PinmemberLuis Alonso Ramos9:53 28 Jul '02  
AnswerRe: Any port to C#? PinmemberFilus4:32 18 Sep '07  
GeneralAnother suggestion PinmemberBin22:25 26 Jul '02  
GeneralProgrammed like a real Jedi Master!! PinmemberWREY23:11 21 Jul '02  
GeneralSuggestion PinmemberRavi Bhavnani17:18 19 Jul '02  
GeneralYou are so right: Always code the important things first :-) PinmemberDaniel Lohmann2:46 19 Jul '02  
GeneralI like it Pinmemberbenjymous1:13 19 Jul '02  
GeneralRe: I like it PinmemberColin Davies20:50 19 Jul '02  
GeneralRe: I like it PinmemberWREY23:40 21 Jul '02  
GeneralRe: I like it PinmemberLuis Alonso Ramos9:47 28 Jul '02  
GeneralRe: I like it PinmemberWREY20:12 28 Jul '02  
GeneralRe: I like it PinmemberNGS 5496727:10 29 Jul '02  
GeneralRe: I like it PinmemberG. Steudtel1:15 21 Aug '03  
GeneralRe: I like it PinmemberWREY8:37 21 Aug '03  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web01 | 2.5.120517.1 | Last Updated 18 Jul 2002
Article Copyright 2002 by Pablo van der Meer
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid