Name |
Language |
Example |
Good Things |
Bad Things |
HTML |
Forms/CGI |
Netrun |
Super easy--browser does all the hard work |
Tough to distribute. Limited interaction (e.g., no custom menus) since browser limits what is possible. |
XHTML |
JavaScript |
Google Maps | Interaction is possible |
Still in a browser. Hideous to write. JavaScript slow, poorly implemented, and nonportable. |
Windows API |
C |
Notepad |
Standard Windows look and feel |
Code runs only on Windows. Simple things can require lots of code. |
MacOS Carbon |
C |
Any Mac Program |
Standard Mac look and feel |
Code only runs on MacOS. Simple things can require lots of code. |
MacOS Cocoa |
Objective C |
New MacOS X Programs |
Interface builder lets you drag-and-drop a GUI |
Code only runs on MacOS X. Must write in funky objective C. |
X |
C |
xfig |
Runs perfectly across a network. |
No code builtin for menus, buttons, scrollbars--you've got to build *everything* yourself. |
GTK |
C |
GIMP |
Nice-looking. Runs (sort of) on all known machines: X, MacOS, Windows |
Big. Interface changes pretty fast. Need big library for Windows applications. Looks a bit weird. |
Qt |
C++ |
KDE Apps |
Nice-looking. Runs well on all known machines: X, MacOS, Windows. Excellent documentation. |
Huge. Expensive for commercial use. Free version is only for noncommercial use on Linux. |
GLUI |
C++ |
Lawlor Demos |
A button takes exactly one line of code. Tiny. Cross-platform. |
Many missing features, like menu bars! Looks/acts "weird". |
AWT |
Java |
Java Applets |
Real interaction, compiled language. Even compiled code is portable. |
Need Java runtime. Tough to put on floppy disk. Can't call old C code. Simple things can require lots of code. |
Swing |
Java |
?? |
Cool antialiased rendering. |
Need latest Java runtime. Tough to mix with AWT. |
Win32.NET (Windows.Forms) |
.NET |
?? |
Double-clickable .exe file. Easy on Windows. |
GUI calls are Windows-specific. |
Tk |
Tcl |
?? |
Very terse--dialogs are really easy to write. |
Tied to Tcl scripting language, which changes pretty quickly. Need to embed Tcl in application. |
First, you need a compiler. Popular non-Microsoft compilers for Windows include the free command-line Borland compilers, gcc-based command-line Minimalist GNU for Windows (MinGW), Code::Blocks IDE, and BloodShed IDE.
But the standard for Windows programming is the Microsoft Visual C++
compilers. The "Visual" has always been something of a
misnomer--it's just a normal C++ compiler. The 2003 version is
called ".NET" (since the compiler is written using the .NET runtime),
but again it accepts plain old C++ like any other compiler.
Visual C++ .NET (Version 7, the 2003 IDE) is installed in the Chapman Lab. The academic version is also available at the UAF tech center for $99.
You can download the "Express" version of the latest Visual C++ 2005 IDE (Version 8) for free from Microsoft; be sure to also get the Windows Platform SDK for "windows.h" and the GUI libraries. Together, these are at least a few hundred meg download.
I've also got a 20MB download with stripped-down command-line
versions of the free Version 7 Microsoft compilers and headers. I
call it "OrionDev",
which you can unzip to C:\Program Files. This doesn't have the ID E,
but it's all command-line folks need. It's preinstalled on the
images\winXP image on the OS Sampler DVD.
Second, you need documentation on the C++ routines to call.
The MSDN Library is the official Microsoft repository of all API calls. For the most part, it's understandable and there are good hyperlinks--for example, see the documentation for CreateWindow or your event-handling window procedure. But it's slow going, and finding the routine you need can be frustrating.
Win32 Tutorials are a simpler way to learn the basics. I'm not partial to any one tutorial, so just Google it.
Finally, you need some example code. These packages will work with all the compilers listed above, as well as Visual C++ 6. Here's a tiny C-style example program of mine called "mini32".