Display Matrix-like CreditsCMatrixCtrl Control

CodeGuru content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More.

This is a control that 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. The control is devired from CWnd.

Here is how you use this class:

  1. Insert the .h and .cpp files into your project.
  2. Create a static control into your dialog resource; it will be the placeholder for the control.
  3. Add a member variable, like this:
  4. CMatrixCtrl m_MatrixCtrl;

  5. In your InitDialog message handler, create the control and place it in the right position:

  6. // determine the rectangle for the control
    CRect rect;
    GetDlgItem(IDC_PLACEHOLDER) >GetWindowRect(rect);
    ScreenToClient(rect);

    m_MatrixCtrl.SetCredits(“What is The Matrix?,This is
    The Matrix!,Programmed by,Pablo van der Meer,Pablo
    Software Solutions,http://www.pablovandermeer.nl”);
    // create the control
    m_MatrixCtrl.Create(WS_VISIBLE | WS_CHILD, rect, this);

For more cool projects, visit Pablo Software Solutions.

Downloads

Download executable demo – 8 Kb

Download source – 15 Kb

More by Author

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends & analysis

Must Read