An Introduction to Numerical Methods in C++, Revised Edition

In this addendum we offer an alternative treatment of graphics to that presented in chapter 15. There we sketched out how to write a graphics package in TurboC++ running in DOS, which would suffice for the limited purposes of this book. We wanted to be able to sketch out functions of a single variable and to map out the screen according to some mathematical prescription. Here we indicate how to achieve the same objectives in TurboC++ for Windows, at the level of Windows 3.1. Later versions of C++ running under Windows 95 and 98 require differences of detail, but the essential techniques described in this Addendum survive intact.
First, however, let us note that all the programs presented in this book, with the exception of those requiring graphics, will run under Windows without modification. Windows runs these programs automatically using the normal library functions. Indeed, the presence of the function main ensures that this will happen. The graphics programs, however, will not work without major modification, and it is the purpose of the addendum to illustrate these modifications.
Programming in Windows is notoriously complicated, as a glance at the classic book by Petzold will confirm. There is a two-way interaction between applications and windows which has to be catered for systematically. Borland have made things somewhat easier, however, by providing with TurboC++ (and also with Borland C++) an extensive Object Windows Library, OWL, of functions which perform automatically much of the more routine coding that is necessary for any Windows...