Project Line Counter Add-In

Line Counter Main Dialog

Project Statistics

Environment: Visual C++ 5 and 6


The Project Line Counter add-in reports statistics about files in your Visual C++ projects. Line Counter was created in order to demonstrate various programming tools and techniques.


  • Varied statistical data about your source code, including:
    • Number of lines
    • Lines with code
    • Lines with C/C++ style comments
    • Mixed lines (code and comments)
  • Reports the distribution of files in your project, by extension.  NEW!
  • Can export the statistical data to a text report file.  NEW!
  • Automatic scan of your project file.
  • Single-click activation.
  • Various parsing options.
  • Online help.
  • Full source code.

The Source Code

Line Counter is a demo/proof of concept application for demonstrating various technologies:

  1. Reusable components from WndTabs (pluggable online help, registry configuration, etc.)
  2. The Add-In Communication Library.
  3. Joshua Jensen's Workspace Whiz! Interface - a powerful extension library for DevStudio add-ins.
All of these components are discussed in detail in the add-in's on-line help file.

What's New?

Version 1.11 is a maintenance release that adds support for WWhizInterface! v2.10

The previous Version 1.10 was a maintenance release, with some new features and a few internal changes:

  • Line-Counter no longer uses the STL, and dependencies on the various STL runtime libraries (such as MSVCP60.dll) has been removed.
  • New feature: A file summary dialog which displays the distribution of files by extension.
  • New feature: Ability to export the statistical results as a simple text report.
  • The old HTML Help support module (HTMLHelpBase.cpp) has been replaced with a new and much improved support module (HHSupp.cpp). Unlike the old HTMLHelpBase which only handled help for dialogs and property pages, the new support module supports full MFC applications. There have also been improvements in the dialog handling code.
See the full version history.


Download binaries (v1.11) - 117 KB
Download binaries with source (v1.11) - 221 KB
NOTE: Please refer to the PLC.txt file for installation instructions.


  • How to install for VS .NET 2003?

    Posted by Frank Lagattuta on 03/23/2005 07:26pm

    How do you install this addin for Visual Studio .Net 2003?

  • Export Summary crashes!

    Posted by Legacy on 09/05/2002 12:00am

    Originally posted by: Ramachandran/Raghu

    Good tool - useful in finding the LOC and comment percentage for large size projects.
    However, we found that the application crashes consistently when attempted to export the result summary.
    Not only this, it even kills the active Visual Studio instance.
    Would be nice if this bug is fixed...

    Good going!

    Mumbai, INDIA

  • Nice code

    Posted by Legacy on 06/06/2002 12:00am

    Originally posted by: Ai Xing

    Excellent source.

  • exclusive files

    Posted by Legacy on 02/21/2002 12:00am

    Originally posted by: smxiang

    for projects that reuse source files from other projects or common libraries, the resued files should be not take in count. so, how about to add "exclusive files list" feature?

    thanks for your great work!

    ABCom, R&D
    Shanghai, China

  • Great..

    Posted by Legacy on 07/11/2001 12:00am

    Originally posted by: Shinto

    Good work Oz.

    saved lot of my time.


  • Suggestions

    Posted by Legacy on 05/10/2001 12:00am

    Originally posted by: Darrell Gerber

    Some suggestions for future versions:

    1) Apply only to the current file
    2) Apply only to the current selection
    3) Options for what is counted as not a line of code.
    i.e. -- lines with only a curly bracket may or may not be counted.

    Otherwise it is great. Saved me alot of time of having to write a macro or something myself.

  • Excellent

    Posted by Legacy on 04/22/2001 12:00am

    Originally posted by: sally

    Excellent - Just what I needed


  • !

    Posted by Legacy on 04/04/2001 12:00am

    Originally posted by: TheAxe


Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Moving from an on-premises environment to Office 365 does not remove the need to plan for disruptions or reduce the business risk requirements for protecting email services. If anything, some risks increase with a move to the cloud. Read how to ease the transition every business faces if considering or already migrating to cloud email. This white paper discusses: Setting expectations when migrating to Office 365 Understanding the implications of relying solely on Exchange Online security Necessary archiving …

  • Enterprises are increasingly looking to platform as a service (PaaS) to lower their costs and speed their time to market for new applications. Developing, deploying, and managing applications in the cloud eliminates the time and expense of managing a physical infrastructure to support them. PaaS offerings must deliver additional long-term benefits, such as a lower total cost of ownership (TCO), rapid scalability, and ease of integration, all while providing robust security and availability. This report …

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date