Click here to Skip to main content
11,438,069 members (46,635 online)
Click here to Skip to main content

CMatrixCtrl - Matrix Credits Control

, 24 Jul 2002
Rate this:
Please Sign up or sign in to vote.
This is an attempt to create a control which looks a little bit like the credits of the Matrix movie.

Sample Image

Description:

This is an attempt to create a control which looks a little bit like the credits of the Matrix movie. While it isn’t the greatest clone of the Matrix credits, it turned out really well. I decided that I wanted the text on the background to be readable as well, so I didn't use the Matrix font (although it might have looked more realistic that way). The control is derived from CWnd.

Usage:

Here is how you use this class:

  1. Insert the .h and .cpp files into your project.
  2. Add a static control into your dialog resource.
  3. Add a member variable for that static control.
  4. Modify the variable declaration.

  5. Change this:
    CStatic m_MatrixCtrl; 
    To this:
    CMatrixCtrl m_MatrixCtrl; 
  6. And finally in your InitDialog message handler set some text for the credits:
  7. m_MatrixCtrl.SetCredits("What is The Matrix?, This is The Matrix!, "
    		"Programmed by, Pablo van der Meer, Pablo Software Solutions, "
    		"http://www.pablovandermeer.nl");

Contacting the Author

Please send any comments or bug reports to me via email. For any updates to this article and other cool projects like this, check my site here.

Revision history

  • 18th July 2002 - Initial revision.
  • 22th May 2002 - Control is now a little bit easier to use. Fixed initialization problem.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Pablo van der Meer
Web Developer
Netherlands Netherlands
No Biography provided

Comments and Discussions

 
AnswerUnicode problems Pin
C++ Hacker5-Nov-13 2:20
memberC++ Hacker5-Nov-13 2:20 
GeneralVisual Studio 2005 issues Pin
C++ Hacker23-Mar-07 2:38
memberC++ Hacker23-Mar-07 2:38 
GeneralVisual Studio 2005 Problems Pin
C++ Hacker19-Mar-07 1:28
memberC++ Hacker19-Mar-07 1:28 
Hello,

I get the following warnings/errors compiling with Visual Studio 2005.

------ Build started: Project: matrix, Configuration: Release Win32 ------
Compiling...
StdAfx.cpp
WINVER not defined. Defaulting to 0x0502 (Windows Server 2003)
Compiling...
matrixDlg.cpp
MatrixCtrl.cpp
.\MatrixCtrl.cpp(385) : error C2440: 'initializing' : cannot convert from 'int' to 'ATL::CStringT<BaseType,StringTraits>'
with
[
BaseType=char,
StringTraits=StrTraitMFC_DLL
]
No constructor could take the source type, or constructor overload resolution was ambiguous
.\MatrixCtrl.cpp(405) : error C2440: 'initializing' : cannot convert from 'int' to 'ATL::CStringT<BaseType,StringTraits>'
with
[
BaseType=char,
StringTraits=StrTraitMFC_DLL
]
No constructor could take the source type, or constructor overload resolution was ambiguous
.\MatrixCtrl.cpp(413) : error C2593: 'operator =' is ambiguous
C:\Programme\Microsoft Visual Studio 8\VC\atlmfc\include\cstringt.h(1315): could be 'ATL::CStringT<BaseType,StringTraits> &ATL::CStringT<BaseType,StringTraits>::operator =(wchar_t)'
with
[
BaseType=char,
StringTraits=StrTraitMFC_DLL
]
C:\Programme\Microsoft Visual Studio 8\VC\atlmfc\include\cstringt.h(1308): or 'ATL::CStringT<BaseType,StringTraits> &ATL::CStringT<BaseType,StringTraits>::operator =(char)'
with
[
BaseType=char,
StringTraits=StrTraitMFC_DLL
]
while trying to match the argument list '(CString, int)'
.\MatrixCtrl.cpp(423) : error C2440: 'initializing' : cannot convert from 'int' to 'ATL::CStringT<BaseType,StringTraits>'
with
[
BaseType=char,
StringTraits=StrTraitMFC_DLL
]
No constructor could take the source type, or constructor overload resolution was ambiguous
.\MatrixCtrl.cpp(441) : error C2440: 'initializing' : cannot convert from 'int' to 'ATL::CStringT<BaseType,StringTraits>'
with
[
BaseType=char,
StringTraits=StrTraitMFC_DLL
]
No constructor could take the source type, or constructor overload resolution was ambiguous
matrix.cpp
.\matrix.cpp(50) : warning C4996: 'CWinApp::Enable3dControls': CWinApp::Enable3dControls is no longer needed. You should remove this call.
C:\Programme\Microsoft Visual Studio 8\VC\atlmfc\include\afxwin.h(4477) : see declaration of 'CWinApp::Enable3dControls'
Generating Code...
matrix - 5 error(s), 1 warning(s)
------ Build started: Project: matrix, Configuration: Debug Win32 ------
Compiling...
StdAfx.cpp
WINVER not defined. Defaulting to 0x0502 (Windows Server 2003)
Compiling...
matrix.cpp
d:\devtemp\matrixctrl\matrix.cpp(50) : warning C4996: 'CWinApp::Enable3dControls': CWinApp::Enable3dControls is no longer needed. You should remove this call.
c:\programme\microsoft visual studio 8\vc\atlmfc\include\afxwin.h(4477) : see declaration of 'CWinApp::Enable3dControls'
MatrixCtrl.cpp
d:\devtemp\matrixctrl\matrixctrl.cpp(385) : error C2440: 'initializing' : cannot convert from 'int' to 'ATL::CStringT<BaseType,StringTraits>'
with
[
BaseType=char,
StringTraits=StrTraitMFC_DLL
]
No constructor could take the source type, or constructor overload resolution was ambiguous
d:\devtemp\matrixctrl\matrixctrl.cpp(405) : error C2440: 'initializing' : cannot convert from 'int' to 'ATL::CStringT<BaseType,StringTraits>'
with
[
BaseType=char,
StringTraits=StrTraitMFC_DLL
]
No constructor could take the source type, or constructor overload resolution was ambiguous
d:\devtemp\matrixctrl\matrixctrl.cpp(413) : error C2593: 'operator =' is ambiguous
c:\programme\microsoft visual studio 8\vc\atlmfc\include\cstringt.h(1315): could be 'ATL::CStringT<BaseType,StringTraits> &ATL::CStringT<BaseType,StringTraits>::operator =(wchar_t)'
with
[
BaseType=char,
StringTraits=StrTraitMFC_DLL
]
c:\programme\microsoft visual studio 8\vc\atlmfc\include\cstringt.h(1308): or 'ATL::CStringT<BaseType,StringTraits> &ATL::CStringT<BaseType,StringTraits>::operator =(char)'
with
[
BaseType=char,
StringTraits=StrTraitMFC_DLL
]
while trying to match the argument list '(CString, int)'
d:\devtemp\matrixctrl\matrixctrl.cpp(423) : error C2440: 'initializing' : cannot convert from 'int' to 'ATL::CStringT<BaseType,StringTraits>'
with
[
BaseType=char,
StringTraits=StrTraitMFC_DLL
]
No constructor could take the source type, or constructor overload resolution was ambiguous
d:\devtemp\matrixctrl\matrixctrl.cpp(441) : error C2440: 'initializing' : cannot convert from 'int' to 'ATL::CStringT<BaseType,StringTraits>'
with
[
BaseType=char,
StringTraits=StrTraitMFC_DLL
]
No constructor could take the source type, or constructor overload resolution was ambiguous
matrixDlg.cpp
Generating Code...
matrix - 5 error(s), 1 warning(s)
========== Build: 0 succeeded, 2 failed, 0 up-to-date, 0 skipped ==========


Andreas.

QuestionVB Code? Pin
jmerencilla19-May-03 15:02
memberjmerencilla19-May-03 15:02 
GeneralSome more corrections for compiling in VC7 Pin
C++ Hacker23-Jan-03 2:41
memberC++ Hacker23-Jan-03 2:41 
Generalsome corrections for compiling in VC7 Pin
tom gee10-Aug-02 23:12
susstom gee10-Aug-02 23:12 
Generalsome corrections for compiling in VC7 Pin
Anonymous10-Aug-02 23:10
sussAnonymous10-Aug-02 23:10 
GeneralThis is soooo cooool !! Pin
WREY6-Aug-02 11:55
memberWREY6-Aug-02 11:55 
GeneralSpiderman control as a next project idea Pin
Nishant S19-Jul-02 4:53
subeditorNishant S19-Jul-02 4:53 
GeneralRe: Spiderman control as a next project idea Pin
Colin Davies19-Jul-02 21:58
memberColin Davies19-Jul-02 21:58 
GeneralVery fine, but ASSERT in Debug Pin
Thomas Haase19-Jul-02 0:03
memberThomas Haase19-Jul-02 0:03 
GeneralRe: Very fine, but ASSERT in Debug Pin
Leaves19-Jul-02 5:07
memberLeaves19-Jul-02 5:07 
GeneralSuggestion Pin
PJ Arends18-Jul-02 19:44
memberPJ Arends18-Jul-02 19:44 
GeneralWhat' next Pin
Rama Krishna18-Jul-02 19:27
memberRama Krishna18-Jul-02 19:27 
GeneralA Real Beauty Pin
Santosh Rao18-Jul-02 19:25
memberSantosh Rao18-Jul-02 19:25 
GeneralNice! Pin
Ravi Bhavnani18-Jul-02 18:56
memberRavi Bhavnani18-Jul-02 18:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.150506.1 | Last Updated 25 Jul 2002
Article Copyright 2002 by Pablo van der Meer
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid