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: September 10, 2014 @ 11:00 a.m. ET / 8:00 a.m. PT Modern mobile applications connect systems-of-engagement (mobile apps) with systems-of-record (traditional IT) to deliver new and innovative business value. But the lifecycle for development of mobile apps is also new and different. Emerging trends in mobile development call for faster delivery of incremental features, coupled with feedback from the users of the app "in the wild". This loop of continuous delivery and continuous feedback is …

  • Java developers know that testing code changes can be a huge pain, and waiting for an application to redeploy after a code fix can take an eternity. Wouldn't it be great if you could see your code changes immediately, fine-tune, debug, explore and deploy code without waiting for ages? In this white paper, find out how that's possible with a Java plugin that drastically changes the way you develop, test and run Java applications. Discover the advantages of this plugin, and the changes you can expect to see …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds