Visual Studio Add-In to Output Source Files in HTML Format

Have you ever found yourself looking at a design document with source code embedded and wondered why isnt this stuff formatted in a way that makes it easier to read? Have you wanted to print out some source and want to emphasize the comments and keywords? Well let me tell you I have.

You can now do all of this from within Developers studio. I spent a couple of Saturdays writing a couple of add-ins that will do this. The first one is HtmlOut and it will convert the source into an HTML file with full syntax highlighting.

A couple of notes on this dialog. The output to RTF is always grayed because it has not been implemented yet. The Project Files radio button under display file causes a read of the .dsw file (Probably will break in future versions of DevStudio). The List control does not act correctly (I think any way).

The next item is the print portion. It is pretty much the same as the HtmlOut except is sends the output to the printer. The same dialog is used as above so the same notes apply.

Before I post the source code I would like to clean it up first. Like I said I wrote this in a couple of weekends so its pretty messy, however if you just cant wait e-mail me and I will send it to you as is.

I need to point out a few people that helped make this possible.

Andrei Stcherbatchenko The syntax coloring text editor. I used this code to do the parsing for me. This is a great set of classes unfortunately I butchered these to get the effect I wanted.  http://www.codeguru.com/editctrl/crysedit.shtml

Chris Maunder The Hyperlink control and the color selection combo boxes. Once again a great set of classes.  http://www.codeguru.com/controls/hyperlink.shtml

Giancarlo Iovino An improved Hyperlink control. Great control that I use a lot.  http://www.codeguru.com/controls/hyperlinkex.shtml

CodeGuru This is the best web site for developers around.

To install:
Download Add-In
Close DevStudio
Extract the zip to the dev studio addin directory. Should be something like c:\Program Files\Microsoft Visual Studio\Common\MsDev98\AddIns
Launch DevStudio
Click the Tools\Customize menu item.
Click The Add-ins and Macro files tab.
Check the "HtmlOut Developer Studio AddIn" and "Print Color class"
Click Close.
You will now have two small tool bars. You can use the Alt Dag method to move these new buttons to your regular toolbars.

Download Add-In (sans source) - 54 KB

Date Last Updated: April 26, 1999



Comments

  • A Class Hierarchy Visualization Tool

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

    Originally posted by: Steven Zee

    DocBuilder V2.0 A Class Hierarchy Visualization Tool

    A HTML Help Automatic Generator

    A Documentation Automatic Creator
    For C++ Developer

    Visit http://www.ucancode.net for more information about docbuilder.

    Reply
  • Another Tool: C2HTML

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

    Originally posted by: Mark Henning

    Hi !

    There's another tiny tool to convert C/C++ sourcecodes to HTML: C2HTML
    (It supports modificationable syntax highlightening and creats a linked table of contents)

    You can download it from http://www.homolog.de
    (Follow the link to the english download section)

    I post this here, because:
    -HtmlOut is no longer supported by the author
    -HtmlOut runs with MS-VC only (C2HTML doesn't need MS-VC to run)
    -I didn't find a Codeguru-section where this tool could be added to. (Currently, there's no "Programming-Tools"-section)

    Greets,

    - Mark Henning

    Reply
  • Usertype.dat data type coloring?

    Posted by Legacy on 10/08/2000 12:00am

    Originally posted by: Mitchell Hayenga

    Could you add support to color the data types/keywords defined in USERTYPE.DAT.... I program in OpenGL and I like to have my data types such as GLint highlighted... thanks

    Reply
  • No longer supporting this tool

    Posted by Legacy on 03/23/2000 12:00am

    Originally posted by: Scott Davis

    I have converted the code to use third party wigets and now I cannot release the source. I regret that I didnt save the original posted dll source so I could release it, but I started into the cleanup process and ended up rewriting the thing. Sorry.

    Reply
  • Question from WebMaster

    Posted by Legacy on 03/22/2000 12:00am

    Originally posted by: Tom Archer

    Nice work indeed! I do have a couple of questions for you:

    1) Are you going to make the source code available?

    2) I also noticed that many questions have gone unanswered. If you're not in a position to answer these question (believe me, I understand if you're too busy!!!) then please let me know and I'll update the article to let others know that so that they don't feel as though they're being ignored.

    Thanks
    Tom Archer
    Web Master - CodeGuru

    Reply
  • Source code ?

    Posted by Legacy on 01/05/2000 12:00am

    Originally posted by: Michael Lindig

    I will test the add-in but only with source code. Where can I get the source ?

    Reply
  • Pls add support for SQL

    Posted by Legacy on 12/10/1999 12:00am

    Originally posted by: Stephan Hodges

    Please add support for SQL files. Currently, it almost works, but doesn't recognize comments that start with a double dash. Also, many keywords are not recognized, etc.

    If you wish to post the source code (as you indicated in the original article), then I would take a go at modifying for SQL.

    Reply
  • Excellent.

    Posted by Legacy on 08/30/1999 12:00am

    Originally posted by: Jignesh Patel

    Brilliant.. :) Waiting on a next release if any.. :)

    Jignesh

    Reply
  • Vice nice. However,

    Posted by Legacy on 08/20/1999 12:00am

    Originally posted by: Sherwood Hu

    Can you provide me the source code? I want to add more features.

    Reply
  • Features I would like to see...

    Posted by Legacy on 04/28/1999 12:00am

    Originally posted by: John Lenz

    - Line numbers
    - Font selection
    - wrapping long lines


    P.S. This is feature that has been missing from VC for a very long time. Good job!

    Reply
  • Loading, Please Wait ...

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

Top White Papers and Webcasts

  • Wednesday, September 24, 2014 8:00 AM - 9:00 AM PDT According to a recent Forrester Research report, many companies are choosing low-code platforms over traditional programming platforms, due to the speed with which low-code apps can be assembled and tested. With customer-facing applications on the rise, traditional programming platforms simply can't keep up with the "short schedules and rapid change cycles" required to develop these applications. Check out this upcoming webinar and join Clay Richardson from …

  • Java developers know that testing code changes can be a huge pain, and waiting for an application to redeploy after a code fix can take an eternity. Wouldn't it be great if you could see your code changes immediately, fine-tune, debug, explore and deploy code without waiting for ages? In this white paper, find out how that's possible with a Java plugin that drastically changes the way you develop, test and run Java applications. Discover the advantages of this plugin, and the changes you can expect to see …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds