Brief Information about the February 98 CSIG Meeting

Disk Free for Windows with M.F.C. ... by Bruce Arnold

Program Output Sample

The February meeting had as it's main presentation, a 32 bit, MFC (Microsoft Foundation Class) version of a program presented several years ago. As shown in the above screen sample, the program will interrogate the hard drive (and Networks if desired) and report back with "free space" statistics.

The program demonstrates graphical MFC windows operations as well as hard drive routines. It is written in MS VC++ and uses a Dialog Box as it's main window. Even so, it can handle a selected set of windows messaging functions. This allows the graphics to respond dynamically as the window is resized.

As written, it supports FAT and NTFS on Windows NT as well as FAT on Windows95. The support for FAT32 on Windows95 is limited to 2 Gigs. (A future modification will allow this functionality also.) NTFS partitions may be any size.

Summary by: Ron Murawski (

User Group News

C/C++ User Group

The February C/C++ meeting was, as always, on the third Tuesday of the month. The meeting started with Random Access, a discussion period where all comments and questions are welcomed.

Group leader Bruce Arnold was questioned as to the differences between the Borland and Microsoft C++ compilers. Bruce prefers Borland for DOS and has no preference for Windows. Bruce stated that the Microsoft compiler is the more popular of the compilers: This can be an important consideration when trying to find tutorials, third party books or source code libraries. A member said that there is a worthwhile service pack available from the Microsoft home page. It's SP3 for VC++ 5.0 and may be downloaded free. (It's about 100 meg)

The main difference between the two C++ compilers, as Bruce sees it, is each vendor's unique approach to encapsulating the Windows API calls into C++ classes. Borland calls their approach OWL (Object Windows Library) and Microsoft uses MFC (Microsoft Foundation Classes). One member said he was anticipating the release of Borland's Builder 3.0 product which will contain both OWL and MFC.

The main presentation was a program written by Bruce to graphically display, as a bar chart, a free space indicator for each available logical hard drive. The program is named DiskFree for Windows. Green bars indicate drives no more than 75% full. Yellow bars depict drives 75 to 95% full. Red bars warn that a drive is at least 95% full with little or no free space.

DiskFree uses MFC to create a user-drawn dialogue box. The featured quality of the program is its ability to dynamically rescale the bar graph as the dialogue box is resized. The source code was much longer than usual, being 9 pages long. The size of the code was, to a large extent, due to Microsoft's Visual C++ Application Wizard.

As an intro to DiskFree, Bruce showed how to use this Wizard to create a simple dialogue box containing a listbox. Bruce kept toggling back and forth between the source code and the Wizard as he changed options. This very clearly demonstrated what code the Wizard was generating. The Wizard includes helpful comments and indicates places where a programmer can add code to do initialization, processing and clean up. Understanding the Wizard's code collapsed Bruce's 9 pages into a program that could be understood in the time available.

The source code and executable are available from the ACGNJ ftp server at:

See SOURCE CODE links below.

"Random Access" questions start at 7:30 Tuesday night.


Source Code Files

For help, email me at b a r n o l d @ b l a s t . n e t
Back to C++ Main Page