Since today, 20th November 2015, marks the 30th birthday of Windows, I thought it appropriate to commemorate its anniversary by programming Windows like it’s 1985. To put that in perspective, these were the days when Miami Vice was the hottest thing on the tube, people dug tunnels under the Berlin Wall and 20 MB was a reasonable size for your hard disk, which you called “Winchester”.
While most developers ignored Windows until version 3 was released in 1990, with good reason, those who didn’t were in for a programming experience that was not for the faint of heart. The “Hello World” program was famously four printed pages long, which rather set the tone. That was however a bit cruel, since a smaller Hello World would have been possible and might have scared fewer programmers away from Windows development. To honour Windows 30th birthday, I’d like to present you with a slightly more manageable Windows Hello World. So, get into the mood with some Dire Straits, Aha, Duran Duran or whatever you were exposed to back then, fire up the Quattro and…
Program like it’s 1985!
1980’s Windows programming entails void pointers, weakly typed wParam and lParam parameters and lots of other goodies that kept programmers of the era awake during endless, nightly debugging sessions. C was the lingua franca for PC programmers and C++ was but a distant dream (the pricey Glockenspiel C++ to C precompiler was by no means for the common programmer). Thus, my example will use C. It will be compilable by Visual Studio 2015 and have a few, but only a few, adjustments necessary for compiling and running in the present day (2015).