Scrolling LED-Matrix classes

This is a set of C++ classes that implement scrolling simulated-LED displays.
Features of this class:
  • Single or multilined displays
  • Scrolling left, right, up or down at various speeds
  • All colours can be very easily changed
  • Display fonts are generated from readily-available raster font files
  • Character sizes can be modified via class parameters
  • Optional auto padding of strings with a supplied string
  • Screen shot of included demo utility


    These classes and demo functions are written in standard C++ and WinAPI, with no MFC.
    The code is built with the open-source MinGW toolchain, which is based on the GNU tools but links to Windows libraries.

    NOTE: All applications and files which are listed on this page are freeware. They may be used for any purpose, commercial or private.

    The matrixstatic class is Copyright (c) 2002 Nic Wilson, though it has been heavily modified by me.
    All other source code and applications are Copyright (c) 2014 Daniel D Miller.

    Download LED Matrix demo program here

    Download LED Matrix source code here

    Download bit-mapped font files here here
    The demo program will require this files to be extracted to the path "..\fntcol" relative to the program install directory.

    Revision history
    1.00    01/31/14    Initial release
    1.01    02/03/14    Modified MatrixStatic constructor to take a
                        data structor which specfies all required params.
                        This hides the sequence of ini operations from user.
    1.02    02/04/14    Code cleanup, remove unused code.
    1.03    02/05/14    Sync changes in lrender, due to another utility
    1.04    02/07/14    Build wShowFont font viewer into this program

    Classes included in this package

    fontmgr class
    This class handles reading the bit-mapped raster files into a memory buffer.

    lrender class
    This class is sub-classed from fontmgr, and handles generating in-memory bitmap images of the characters in the font buffer, and copies the resulting bitmap images to the screen using BitBlt().

    matrixstatic class
    This class handles string manipulation and on-screen position computation for the user data.

    Viewing the bit-mapped raster fonts
    Clicking the Font Viewer button will open a separate window that will allow the user to view any of the font files that this package can work with.

    This window displays the full 256-characters of any of the bit-mapped fonts which are supported by this library.
    It also allows the viewer to alter any of the settable parameters in the lrender class that is used by both of these programs to render the fonts.

    Screen shot of Font Viewer window


    History of the text-scrolling class
    In 2002, Nic Wilson posted an article on the Code Project website, offering a C++ class (and demo program) which would produce horizontally- and vertically-scrolling text that resembled LED displays. This class elegantly handled the string manipulation and character mapping required for the scrolling actions, and did a nice job of utilizing existing WinAPI frame controls.

    However, his project used static bitmap files to generate the display characters, which made it difficult to add other character sets. I incorporated the portions of his class which did not deal with bitmap files, into my project, and replaced the static bitmaps with classes to read bit-mapped font files and convert them into in-memory bitmaps, as discussed above.

    I sincerely thank Nic Wilson for providing the inspiration for this project, as well as showing me how to solve several technical challenges. Unfortunately, his website is no longer extant, and I don't know where to find him.