Click here to Skip to main content
15,887,822 members
Articles / Desktop Programming / MFC
Article

CStarWarsCtrl - Star Wars Credits Control

Rate me:
Please Sign up or sign in to vote.
4.95/5 (14 votes)
17 Jul 2002 208.1K   4.2K   77   36
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


Written By
Web Developer
Netherlands Netherlands
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
GeneralGreat !!! Pin
4you17-Feb-05 1:11
4you17-Feb-05 1:11 
GeneralA bug report and modify way Pin
Zhaolei13-Jan-05 14:14
Zhaolei13-Jan-05 14:14 
GeneralRe: A bug report and modify way Pin
y_yy200820-Dec-08 17:48
y_yy200820-Dec-08 17:48 
GeneralKillTimer Pin
Alex Evans8-Jul-04 22:14
Alex Evans8-Jul-04 22:14 
Generalbetter fade out without space bending Pin
botsjeh21-Aug-03 23:47
botsjeh21-Aug-03 23:47 
GeneralStalling bug detected Pin
Emcee Lam18-Oct-02 10:06
Emcee Lam18-Oct-02 10:06 
GeneralRe: Stalling bug detected Pin
sanghyun yi18-May-03 15:15
sanghyun yi18-May-03 15:15 
GeneralRe: Stalling bug detected Pin
Adam °Wimsatt28-Oct-03 11:18
Adam °Wimsatt28-Oct-03 11:18 
GeneralGREAT! Pin
Anonymous30-Jul-02 1:00
Anonymous30-Jul-02 1:00 
GeneralWould be better in OpenGL Pin
a.r.f.28-Jul-02 17:58
a.r.f.28-Jul-02 17:58 
GeneralRe: Would be better in OpenGL Pin
vsoft11-Aug-02 12:31
vsoft11-Aug-02 12:31 
QuestionAny port to C#? Pin
Luis Alonso Ramos28-Jul-02 9:53
Luis Alonso Ramos28-Jul-02 9:53 
AnswerRe: Any port to C#? Pin
Filus18-Sep-07 4:32
Filus18-Sep-07 4:32 
GeneralAnother suggestion Pin
Abin26-Jul-02 22:25
Abin26-Jul-02 22:25 
GeneralProgrammed like a real Jedi Master!! Pin
WREY21-Jul-02 23:11
WREY21-Jul-02 23:11 
GeneralSuggestion Pin
Ravi Bhavnani19-Jul-02 17:18
professionalRavi Bhavnani19-Jul-02 17:18 
GeneralYou are so right: Always code the important things first :-) Pin
Daniel Lohmann19-Jul-02 2:46
Daniel Lohmann19-Jul-02 2:46 
GeneralI like it Pin
benjymous19-Jul-02 1:13
benjymous19-Jul-02 1:13 
GeneralRe: I like it Pin
ColinDavies19-Jul-02 20:50
ColinDavies19-Jul-02 20:50 
GeneralRe: I like it Pin
WREY21-Jul-02 23:40
WREY21-Jul-02 23:40 
GeneralRe: I like it Pin
Luis Alonso Ramos28-Jul-02 9:47
Luis Alonso Ramos28-Jul-02 9:47 
GeneralRe: I like it Pin
WREY28-Jul-02 20:12
WREY28-Jul-02 20:12 
The "Theory of Duality" is not about light. It's about the electron and its orbit around the nucleus of the atom.

It states (in part) that the electron is BOTH "matter" and a "wave" at the SAME TIME!! Indeed, that it CANNOT exist separately at any single moment; it HAS to be BOTH. However, (and this is where you have to get the concept right) it can ONLY be viewed or determined as ONE at any one time. This means, even though the electron possesses both characteristics, you can ONLY work or study it as ONE, at any one time (NOT BOTH at the same time).

That is why you can ONLY tell one of these two things with it: As "matter" you can tell where the electron is (i.e., its "position"), OR as a "wave", how fast it is moving, but not both things AT THE SAME TIME.

This was the postulate of the German physicist, Werner Karl Heisenberg, based on the postulates of the Danish physicist, Niels Bohr, that

First Postulate (on stationary states): In the atom there are orbits in which an orbiting electron does not radiate.

Second Postulate (on quantum jumps): Radiation only occurs when an electron jumps from one stationary orbit to another.

Heisenberg tried to explain the Bohr's postulate by stating that the motion of the atomic electron cannot be pictured as the motion of a small ball along a trajectory. One simply cannot follow its motion as closely as one would follow the motion of a billard ball, and to do so, one would be seeking answers from asking the wrong questions which would yield WRONG answers.

Heisenberg contended that to obtain the correct answers to those questions, we must ask the sort of questions that "describe motion in the atom." This means, formulate an equation that mathematically asks the question.

Up until that time, everyone had been using the equations of electrodynamics to find the hypothetical trajectory x(t) of an electron in the atom, a trajectory that would have a continuous dependency on time, and could be expressed as the series of numbers x1, x2, x3, ... -- the positions of the electron at t1, t2, t3, ..., respectively.

Heisenberg held that there was no such trajectory in the atom, and that instead of a continuous curve x(t) there was a set of discrete numbers x(nk), where n and k are the numbers of the initial and final states of the electron, hence, a matrix.

These are the stuff of Quantum Mechanics.

Cool | :cool:

William
GeneralRe: I like it Pin
NGS 54967229-Jul-02 7:10
NGS 54967229-Jul-02 7:10 
GeneralRe: I like it Pin
G. Steudtel21-Aug-03 1:15
G. Steudtel21-Aug-03 1:15 
GeneralRe: I like it Pin
WREY21-Aug-03 8:37
WREY21-Aug-03 8:37 

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

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