Matrix-Like Credits for MFC Applications

I was somewhat disappointed by Pablo van der Meer's CMatrixCtrl, so I decided to develop something as close as possible to the actual movie credits. The result actually supports many more effects than just the Matrix look-and-feel. Some of these effects are controlled via member functions. Other, more obscure, adjustments can be made via parameters documented at the top of JMatrixCtrl.cpp.

The sample code included in the package shows the simple way to use JMatrixCtrl—construct it on top of a placeholder in your dialog. If you want to get fancy, you can add JMatrixCtrl to the class wizard and then add a member variable directly to your dialog.

Regardless of how you create it, it is very easy to use. Simply call AddTextLine() for each line of text that you want to display. To insert a page break, call AddTextLine("\x01 N"), where N is the number of seconds to pause before displaying the next page.



About the Author

John Lindal

Developed Code Crusader & JX Application Framework on Linux. Yahoo!

Downloads

Comments

  • Nice

    Posted by Deniz on 07/04/2005 10:33pm

    I like it

    Reply
  • can I use Japanese characters as background

    Posted by Achilles on 04/30/2005 01:20pm

    it has very impressive effects. I have used it in an application with fullscreen display. However, the movie Matrix use Japanese characters as background, you may considering add this feature of setting any language character as background. From your code, I see the settings of background looks like m_pMatrixColumns[col].prev = (blank ? ' ' : getrandom('a', 'z')); It does not use unicode characters, so it would be a little difficult to add this feature from current code. Maybe you can use a predefined set of characters in your class to display to background. :)

    Reply
  • function not found

    Posted by Roger65 on 04/26/2005 12:23pm

    You declared: SetIntervals(const int intro, const int restart); in the header file but it was not defined anywhere.

    Reply
  • 2 small details

    Posted by Wivern on 06/29/2004 09:27am

    1. I had to add "#include " to JMatrixCtrl.h because my project didn't include it. Now I don't have to worry about it anymore. 2. When I started a JMatrixCtrl without any text it gave an Assert fault in InitCursor (after the InitTextimer stopped). I solved this problem with the follwing code: void JMatrixCtrl::InitCursor() { if (m_bShowCursor && (m_nActiveLine!=-1)) { ....

    Reply
  • Cool effect

    Posted by kirants on 06/09/2004 03:38pm

    Good one... Eager to see more effects added :)

    Reply
Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Live Event Date: August 20, 2014 @ 1:00 p.m. ET / 10:00 a.m. PT When you look at natural user interfaces as a developer, it isn't just fun and games. There are some very serious, real-world usage models of how things can help make the world a better place – things like Intel® RealSense™ technology. Check out this upcoming eSeminar and join the panel of experts, both from inside and outside of Intel, as they discuss how natural user interfaces will likely be getting adopted in a wide variety …

  • Agile development principles have gone from something used only by cutting-edge teams to a mainstream approach used by teams large and small. If you're not using agile methods already though, or if you've only been exposed to agile on small projects here and there, you may wonder if agile can ever work in your environment. Read this eBook to learn the fundamentals of agile and how to increase the productivity of your software teams while enabling them to produce higher-quality solutions that better fulfill …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds