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

  • Mobile is introducing sweeping changes throughout your workplace. As a senior stakeholder driving mobile initiatives in your organization, you may be lost in a sea of technologies and claims from vendors promising rapid delivery of applications to your employees, customers, and partners. To help explain some of the topics you will need to be aware of, and to separate the must-haves from the nice-to-haves, this reference guide can help you with applying a mobile strategy in the context of application …

  • Live Event Date: August 13, 2014 @ 1:00 p.m. ET / 10:00 a.m. PT If you are developing applications, you'll want to join us to learn how applications are changing as a result of gesture recognition. This technology will change how you and your users interact - not simply with your devices, but with the world around you. Your devices will be able to see and hear what your users are doing. Are your applications ready for this? Join us to learn about Intel® RealSense™ Technology, including never been …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds