Click here to Skip to main content
13,198,563 members (26,835 online)
Click here to Skip to main content
Add your own
alternative version


70 bookmarked
Posted 14 Dec 2003

CCloudsCtrl - Simulating clouds using MFC

, 14 Dec 2003
Rate this:
Please Sign up or sign in to vote.
This control simulates clouds with scrolling text and can be used as an aboutbox.

Sample Image - CCloudsCtrl.jpg


This class simulates clouds by using plasmas and a few 'simple' pixel operations.

3 layers of plasmas are blended together to build an image that looks like pretty realistic clouds (on a not so cloudy day...). There's also an option to enhance the clouds with an exponential function, to create an even more realistic looking sky. You can learn the complete theory by reading the excellent tutorial here. Unfortunately, this great article only gives us pseudo code, so we have to do the rest ourselves... The plasma implementation is partially based on code by Andrea Griffini (found on the Internet).


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

Change this:

CStatic m_CloudsCtrl;

To this:

CCloudsCtrl m_CloudsCtrl;

In your dialog's constructor, set text for the credits:

CString strCredits = "\tCCloudsCtrl Example\n\n"
      "\rProgrammed by:\n"
      "Pablo van der Meer\n\n\n"
      "\rSpecial thanks to:\n\n\n\n"
      "Copyright © 2003 Pablo Software Solutions\n"
      "All right reserved.\n\n\n"


Contacting the Author

Please send any comments or bug reports to me via email. For updates to this article (and many other articles), check my site.


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
No Biography provided

You may also be interested in...

Comments and Discussions

QuestionHow to increase the size of display string (strCredits) Pin
apurv14618-Aug-09 3:09
memberapurv14618-Aug-09 3:09 
QuestionHow do i control the coordinates of the clouds? Pin
J. Myers15-Feb-07 6:08
memberJ. Myers15-Feb-07 6:08 
GeneralMemory Error Pin
Fad B13-May-06 4:34
memberFad B13-May-06 4:34 
GeneralAmazing Stuff!!!! Pin
rajeev8210-Jan-06 4:29
memberrajeev8210-Jan-06 4:29 
GeneralRe: Amazing Stuff!!!! Pin
Portatofe2-Oct-08 8:41
memberPortatofe2-Oct-08 8:41 
QuestionResizing the control ? Pin
sl0020-May-04 11:27
susssl0020-May-04 11:27 
Questionanything for 3d? Pin
Joaquin Grech (Creative1)25-Dec-03 10:34
memberJoaquin Grech (Creative1)25-Dec-03 10:34 
AnswerRe: anything for 3d? Pin
Pablo van der Meer25-Dec-03 10:55
memberPablo van der Meer25-Dec-03 10:55 
GeneralRe: anything for 3d? Pin
Joaquin Grech (Creative1)25-Dec-03 12:00
memberJoaquin Grech (Creative1)25-Dec-03 12:00 
QuestionNice, how can I change colors? Pin
naveed22-Dec-03 7:00
membernaveed22-Dec-03 7:00 
AnswerRe: Nice, how can I change colors? Pin
Pablo van der Meer22-Dec-03 8:04
memberPablo van der Meer22-Dec-03 8:04 
GeneralGreat work Pin
bfadi19-Dec-03 1:47
memberbfadi19-Dec-03 1:47 
Generalnice. Pin
beavis15-Dec-03 22:38
memberbeavis15-Dec-03 22:38 
GeneralCool!!! Pin
Luis Alonso Ramos15-Dec-03 7:58
memberLuis Alonso Ramos15-Dec-03 7:58 
GeneralRe: Cool!!! Pin
Uwe Keim18-Dec-03 1:15
sitebuilderUwe Keim18-Dec-03 1:15 
GeneralGood - but room for improvment Pin
Joel Holdsworth15-Dec-03 5:47
memberJoel Holdsworth15-Dec-03 5:47 
GeneralRe: Good - but room for improvment Pin
Pablo van der Meer15-Dec-03 6:41
memberPablo van der Meer15-Dec-03 6:41 
GeneralRe: Good - but room for improvment Pin
Balkrishna Talele16-Dec-03 0:09
memberBalkrishna Talele16-Dec-03 0:09 
GeneralRe: Good - but room for improvment Pin
Joel Holdsworth16-Dec-03 0:11
memberJoel Holdsworth16-Dec-03 0:11 

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.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.171020.1 | Last Updated 15 Dec 2003
Article Copyright 2003 by Pablo van der Meer
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid