Microsoft Windows

Microsoft Windows is the dominant desktop environment. Programs for this environment can be written in many languages and using many toolkits. Here we will concentrate on the Microsoft Foundation Class and Borland OWL toolkits.

With the appearance of Borland C++ version 4 the OWL programming conventions are now much like the MFC conventions. So the example programs referred to below are all based on MFC classes. As an illustration of the components I have taken the program from chapter 4 of Ammeraal's book.

The required files are

This is the module definition file which is required by the linker. In this form it is used for EXE files. DLL's require a different form.
The resource script file. The resource compiler uses this to create the code for menus, dialog boxes etc.
A header file for the menus. Note the #defines used to connect symbolic names for menu entries with integers. The connection between the menu items and the methods to be invoked is made in:
The main file. Note the MESSAGE MAP which connects the events (in this case menu choices) with the methods to be invoked.

Return to GUI home page

Last Changed: 26 June 1995