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

  • IBM Worklight is a mobile application development platform that lets you extend your business to mobile devices. It is designed to provide an open, comprehensive platform to build, run and manage HTML5, hybrid and native mobile apps.

  • Businesses are moving more and more of their customer transactions to the web. Security is understandably a top concern as online transactions increase, so it is important to make sure your electronic signature provider meets the highest security standards. That means more than simply passing a security audit or obtaining a certification. This white paper provides recommendations for taking a broader view of e-signature security, and answers key questions that help identify the security requirements against …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds