Logo

Introduction

In the early 80s I bought my first personal computer. A c compiler was available for it and the rest is history. I finally saw the light in the 90s and bought my first Windows machine and eventually moved on to c++. My professional life involved assembly language, Fortran, Unix, C, C++ Ada, and so on.

MakeApp (Template for MFC Apps)

Eventually I found Microsoft Foundation Class (MFC). After playing with it for a long long time I found a few things that I thought would be useful. However, I wound up reinventing them from time to time. Eventually I created MakeApp so that most of the features I thought would be useful would be included when the app was created. Then those things I did not need could be easily removed (they are marked as examples).

CodeGen (Generate Code for MS Access)

Another interesting project was to figure out how to read and write to an MS Access Database. This is actually quite difficult but being patient I was able to get a mechanism to interface c++ to MS Access. Then several versions of Windows later caused the original interface to just go away. Then another one was found. So CodeGen allows one to create classes (in separate files) that allow a c++ program to read and write to a MS Access Database.

WixApp (Simplify Wix Preparation)

When the project is all done a release copy needs to be constructed. The release copy is usually produced with out debugginng databases and logic in the program to aid in the debugging. However, that is not enough. One needs an installer to copy all the relevant files into a Program Files directory, setup a folder in the Start Menu, put links on the desktop, etc. The WIX Toolset provides an application to do just that. The WIX Toolset may be found here.

I started using the tool set producing the Product.wxs file by hand following the documentation that is available at the WIX Toolset web site. After many attempts to get the Product file correct I embarked on an app to produce the Product.wxs file from a list of files and set of options. I did not try to include every feature of the WIX Toolset, just enough to install my applications.

GitPrep (Prepare Project for GitHub)

We have created an interesting application starting with MakeApp, using CodeGen to produce some modules to aid access to MS Access, and we have produced a working installer. Everything is working good enough to upload it to GitHub. So one writes a ReadMe.md file, copies everything in a local Git directory and uses GitHub Desktop app to upload the application to the GitHeb web site. And it fails, saying that the upload is too large.

It turns out there a lot of redundant files included in the project as copied to the Git directory. They must be removed. GitPrep does just that. It leaves the source, documentation, the executable and the installation file. GitHub Desktop then proceeds to upload without error.

Expandable Article

The Expandable Article is an attempt to describe my version of a few c++ templates that implement a method for creating a vector (e.g. data[i]) that expands as needed. Once a vector is created one can linearly traverse the vector without knowing its length (although that information is easily available).

The Expanable Template will create the vector but it needs assistance in the class that holds the vector. However once created properly it has many useful properties:

  • A datum (an item in the vector) may added at the end of the vector
  • A datum may be added with an insertion sort to maintain a sorted vector using any key in the datum
  • A qsort may be performed on the vector
  • An iterator may be used to touch each datum in the vector
  • A datum (class object) may be held at each entry in the vector
  • A pointer to an allocated datum may be held at each entry in the vector
  • When the Expandable vector is constructed, each datum's constructor is called
  • When the Expandable vector is deleted (e.g. when the class is destroyed) each datum's destructor is called.
  • If the vector contains a pointer to a datum then when the vector is destroyed, the datum's destructor is called and the datum is returned to the heap
  • And other features are available

The usefulness of not worrying about the actual size of the vector once the vector is constructed makes up for the awkwardness of the construction process. Having written the paper I found some weaknesses and set about fixing them. The bigest weakness is only one can appear in a class or function.

AdjProj (Adjust Project in vcxproj)

The last coding application is called AdjProj. It was written when I found that the Visual Studio project file sometimes got confused and the files did not sort properly. So this app inspected the VS xxx.vcxproj file and put things in a good order. Then VS and Slickedit picked up the correct order. It seems that VS behaves better now and I haven't needed this app for a while.