25 Years of Programming
An open source source for C, C++, OWL, BASIC, MDB, XLS, DOT, and more...
Home   Projects   Up   Sitemap   Search   Blog   Forum+Chat   About Us   Privacy   Terms of Use   Feedback   FAQ   Images   Services   Ads   Donate   Humor

Programs and classes in Borland C++ 4.0 ObjectWindows Library OWL 2.0

ObjectWindows Library was Borland's object oriented encapsulation of the Windows API. Treating Windows objects as standard C++ objects with member variables, member functions, and functions for responding to Windows messages (later to be called properties, methods, and events) made it much easier to learn how to write a Windows GUI program.

The Borland C++/OWL package included the OWL source code, 7 printed books (2,715 pages) of well-written reference documentation and walk-through tutorials, plus example projects demonstrating how to use nearly every OWL feature. Back in the days before free trial downloads, this was a tremendous bargain in educational materials even at its price of $329. It made learning C++ and Windows programming fun. These projects were ones I developed while learning.

Each project link on this page goes to a separate page with a more complete program description, a code listing, and, if the project is large, a link for downloading its zip file.

The Images link at the top of this page goes to image galleries created by several of these programs.

OWL programs

Each text link goes to the project page. Thumbnail link goes to full-sized image.

Chess.cpp
Game board used by the Chess program.
Uses a TLayoutWindow to create an invertible chess board with pieces on it. As you move the pieces, it creates a record of the game which can be saved to disk, reloaded, and animated. The program does not, however, play chess, but you can play a game on the board it provides. The page also has links to some chess-related websites.
Neural Network
with graphic display
Visible neural network that you watch.
A multi-layer backpropagation artificial neural net program that uses graphics to show the status of the network nodes as they "think". There is also a listing of the earlier (and simpler) MSDOS version of the program, and a link to the most recent Microsoft Visual C++ version.
Natural Language Processing chatbot An Eliza-like program that converses with you, while performing natural language processing (NLP) on your input in an attempt to extract information, accumulate world knowledge, and learn correct grammatical constructions.
Mandelbrot set
Mandelbrot set area.
Continuously generates random regions at random magnifications that are filtered (screened) to avoid displaying blank or boring areas. Full-featured program with zooming by quadrant or area select, color cycling (animation), fast palette swapping, and palette manipulation. The project also includes the predecessor MSDOS C++ version of the program and a Java application version.
Logistic Map Bifurcation Diagram display 
Logistic map bifurcation diagram area.
Displays the logistic map bifurcation diagram of the equation X=RX(1-X) as discovered by Robert May and described in Chaos, by James Gleick. This program was derived from the Mandelbrot program, works the same, and has its fancy features, including continuous generation mode.
Iterated function set (IFS) fractals
IFS fractal image.
Continuously draws color fractals based on randomly-generated Iterated Function System (IFS) sets. Multiple drawing windows. Manually edit transform sets. Crossbreed sets using a genetic algorithm with mutation.
Game of Life cellular automaton
Screenshot of Game of Life, Windows version.
Plays the Game of Life, a cellular automaton originated by John Conway. Allows standard, random, or custom born/survive/die rules. User-adjustable field size also adjusts cell size from 1 pixel to very big for easier viewing.
Artificial life, evolution, adaptation demonstration
Screenshot of Artificial Life evolution program.
Creates imaginary animals (as dots) that move around the screen according to a self-contained program, eating each other or producing offspring using a genetic algorithm, such that the programs evolve by natural selection, survival determined by which ones are most effective at obtaining food or producing offspring.
Bitmap file animator Displays .BMP bitmap files sequentially to animate them.

OWL-based utility classes

SDib extension of the Borland OWL TDib class An extensive derivation (for 256-color DIBs only) of the Borland OWL TDib class, adding palette manipulation functions, support for color cycling, flip vertical and horizontal, and very fast methods for getting and setting pixel color values.
SDibWindow class (manages an SDib for an application) Derived from TWindow, this class contains an SDib plus arrays for holding lists of file names, including color map files, plus the menu items and event handlers needed to implement the features of the SDib, plus an IdleAction function that handles color cycling, plus the variables that control the behavior of a graphics application (such as turning color cycling on and off or changing the direction), plus the dialogs for loading and saving color map files, plus the functions that allow a user to define a selection area in preparation for zooming, etc etc! Most of the "Wow!" features of my largest graphics applications are provided by SDibWindow.
SDDEApplication and related DDEML classes A large class derived from TApplication and a set of several other classes that together provide client/server DDE functionality to an OWL application.
SWinCommDev (Windows serial communications class) A drop-in class for Windows that provides some RS-232 serial communication capabilities.

Other OWL pages

OWLRES.RC and OWLRES.RH Description of how to set up files containing all the predefined OWL resources with their resource identifiers to avoid identifier conflicts later in the project. 

Bug Notes

  1. .RTF file incompatibility -- Some of the largest of these projects have .RTF documents to be used for creating Help files with the Microsoft Help Compiler. However, they were edited with Word 2003 before being added to the project zip files. Word 2003 added some metadata that causes parse errors when the files are compiled with the Help Compiler for Windows 3.1. The solution is to open the .RTF file in Word 6.0 and save it. Word 6 strips out the incompatible data.

Version Note

These programs were all written with Borland C++ 4.0 and ObjectWindows Library (OWL) 2.0.  When I compile them in that environment (on my Windows 3.1 computer), the executables will not run under Windows XP.

The .exe's (not currently provided on the site) crash on launch with an error something like GDI Error or GDI Failure. Whether I compile them for a Win16 or Win32 target (Win32s), they crash, even if they ran perfectly under Win32s with Windows 3.1.

I don't know the cause. Windows XP's backwards compatibility is supposed to be pretty good, but apparently not for OWL. So far I've found no simple fix or work-around, but one solution which I have not yet tried is in the next section.


OWLNext

OWL has been ported to Windows 95/98/NT/2000/XP/Vista and Linux by a project called OWLNext. To install, you must first upgrade your OWL installation to the final OWL Version 5. Then OWLNext is installed as patches to Version 5. 

The OWLNext site also has a comprehensive set of OWL resources that includes articles, tutorials, OWL projects, links to other OWL-related sites, and more.

The OWL Usenet discussion group is a place to ask OWL-related questions.


Converting programs from ObjectWindows to Microsoft Visual C++

I was surprised to discover that it is relatively easy to convert Borland OWL code to Microsoft Visual C++ even though the process is a rewrite more than a conversion.

Text substitutions are often all that's required to convert Borland's BIDS TArray classes to STL.

Screen elements like Windows, menus, and other objects must be built from scratch, but the Visual C++ form designer interface makes that relatively easy. The hard part was designing the elements in the first place, and that's already done.

Learning the new .NET Framework equivalents of the OWL methods can be difficult and time-consuming, but the .NET methods are incredibly powerful and the results are very good.

I've done a few project conversions so far. If you have your own OWL code to convert, comparing the two versions might provide you with tips how to proceed.

 

 

Valid HTML 4.01 Transitional Valid CSS
View content labeling at ICRA.
Copyright ©2009 Steven Whitney. Last modified 06/25/2009.