The Old New Thing

The evolution of menu templates: 32-bit classic menus

Now that we've got a handle on 16-bit classic menu templates, we can move on to the next evolutionary step, namely 32-bit classic menu templates. The 32-bit classic menu template is in fact nearly identical to the 16-bit classic menu template. The only change is that the menu text is now a Unicode string instead of an ANSI string. ...

Warning: This cereal may contain traces of spiders

In a Lisbon grocery store, I was looking at the ingredient panel of a box of cereal. It contained the information in multiple languages, and French came first. I was momentarily stunned by the following warning: Traces possibles d'arachides. I guess this falls in the category of "Raymond misreads French cereal box warnings...

The evolution of menu templates: 16-bit classic menus

Menus aren't as complicated as dialogs. There are no fonts, no positioning, it's just a list of menu items and flags. Well, okay, there's the recursive part, when a menu has a submenu. But that's really the only wrinkle. Most of it is pretty boring. The 16-bit classic menu template begins with the following header: struct MENUHEADER16 { ...

The evolution of menu templates: Introduction

As with dialog templates, menu templates have also gone through a four-stage evolutionary process. People don't often generate menu templates in code, although the function is there waiting for you once you get the urge. As a result, there aren't many questions from people trying to generate menu templates dynamically, but I'm going to go ...

Why is the LOADPARMS32 structure so messed up?

If you look at the LOADPARMS32 structure, you'll find a horrific mishmash. Double-null-terminated strings, a null-terminated string, some WORDs, and even a Pascal-style string. What's going on here? Each of those members comes from a different era in time. The oldest member is the Pascal-style command line, which dates back to CP/M. On CP/...

Double the usual number of fire alarms today

Firefighters hate the Fourth of July, the holiday dedicated to blowing up stuff, because when amateurs try to blow up stuff, they often blow up stuff they didn't intend to blow up. One of my friends has a particular unfortunate knack of drawing disasters to his neighborhood. One July 4th, a house in his neighborhood burnt down due to a stray...