Classic Computer Magazine Archive COMPUTE! ISSUE 148 / JANUARY 1993 / PAGE 50

Programming Windows in C. (Borland C++ 3.1 compiler) (Software Review) (Evaluation)
by Clifton Karnes

In last issue's article "Windows Programming from Scratch," Tom Campbell says that Microsoft C/C++ 7.0 is the programming deal of the century. I couldn't agree more. For $139 you can get one of the best Windows development environments around, complete with a global optimizing compiler, an integrated development environment, and a suite of excellent Windows programming tools.

But what you won't get, in my opinion at least, is the best Windows development environment. For that, you'll need to get Borland C++ 3.1 (Borland International, 1800 Green Hills Road, Box 660001, Scotts Valley, California 95066; 408-438-8400; $495; $749 with Application Frameworks).

Borland C++ 3.1 contains everything you need to create Windows applications--you don't need to buy Microsoft's Windows Software Development Kit. With Borland C++ 3.1, you'll get a Windows-hosted IDE (Integrated Development Environment), a Windows debugger (that unfortunately runs in DOS character mode only), Resource Workshop (for creating and editing everything from dialog boxes to bitmaps), WinSight (an analysis and debugging tool), WinSpector (a postmortemanalyzer), and a boxload of other tools.

Let's start with the Windows IDE. Borland C++ 3.0 came with Turbo C++ for Windows, which let you create Windows programs in a Windows IDE. But if you wanted to optimize your code, you had to compile with the DOS version of the product. Borland C++ 3.1 now has a full-blown Windows IDE for the optimizing Windows compiler. Now you can edit, compile, link, and run your programs from Windows. It's worth noting that BC 3.1 is the only Windows-hosted optimizing compiler available (QuickC for Windows and Turbo C++ for Windows are not globally optimizing compilers).

One of the IDE's best features is syntax highlighting. This technique (which Borland pioneered) lets you choose colors for language elements. If applied without restraint, syntax highlighting can make your screens look like bad Christmas decorations, but when used creatively, it makes code easier to read and debug.

The IDE also gives you a choice of slightly different interfaces: CUA or Alternate. You'll want to use the Alternate interface, however, because you can customize it with keystroke macros and keyboard reassignments.

You can also map the right mouse button to any of several actions. I've set it to load help and search for the word at the cursor, which is great for checking Windows API functions.

The compiler is full featured, supporting both C and C++, and you can use it and the integrated linker to create both exe and dll files. You can also use precompiled headers, which create a binary symbol table from a header file, so the whole file doesn't need to be recompiled each time you compile your program. With the windows.h header file clocking in at more than 4000 lines, this is a tremendous productivity boost.

In addition to being able to compile Windows exe and dll files, you'll find full support for OLE, multimedia, pen computing, TrueType fonts, and DDE.

As mentioned above, BC 3.1 includes a number of tools that make creating Windows apps easier. First and foremost there's the Resource Workshop. You can use this resource editor to create and edit dialog boxes, bitmaps, icons, and cursors. And you can edit these resources either as source files or inside exe and dll files. The Resource Workshop also includes several custom controls for placing bitmaps on buttons, creating canvaslike backgrounds, and sculpting a 3-D look for dialogs.

Of the other tools, WinSight is outstanding. In this one tool Borland combines a half-dozen utilities and includes information on window attributes, window messages, and DDE and OLE conversations.

After working for several weeks with both Microsoft and Borland environments, I have to give the nod to Borland. Both compilers produce high-quality code, but Borland's Windows-based IDE is light years ahead of Microsoft's Programmer's Workbench, and Borland's compile times are faster. You can produce great products with either development environment, but with Borland's, you'll get the job done faster, and have much more fun.