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: November 20, 2014 @ 2:00 p.m. ET / 11:00 a.m. PT Are you wanting to target two or more platforms such as iOS, Android, and/or Windows? You are not alone. 90% of enterprises today are targeting two or more platforms. Attend this eSeminar to discover how mobile app developers can rely on one IDE to create applications across platforms and approaches (web, native, and/or hybrid), saving time, money, and effort and introducing apps to market faster. You'll learn the trade-offs for gaining long …

  • Live Event Date: October 29, 2014 @ 11:00 a.m. ET / 8:00 a.m. PT Are you interested in building a cognitive application using the power of IBM Watson? Need a platform that provides speed and ease for rapidly deploying this application? Join Chris Madison, Watson Solution Architect, as he walks through the process of building a Watson powered application on IBM Bluemix. Chris will talk about the new Watson Services just released on IBM bluemix, but more importantly he will do a step by step cognitive …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds