The Old New Thing

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...

Raymond misreads newspaper head… no wait, I didn’t!

I have a habit of misreading newspaper headlines, so I simply assumed that this was just another one: Phelps sets word record in 400 IM. (And no, I don't normally read the Rocky Mountain News. The actual headline was printed across the top of the June 30 Seattle Times Sports section, but I couldn't find the headline in the online archives, ...

Uninitialized floating point variables can be deadly

A colleague of mine related to me this story about uninitialized floating point variables. He had a function that went something like this, simplified for expository purposes. The infoType parameter specified which piece of information you're requesting, and depending on what you're asking for, one or the other of the output parameters may ...

AndrĂ¡s Schiff 2006 lectures on the Beethoven piano sonatas

In 2006, pianist András Schiff gave a series of eight lecture-recitals covering the complete cycle of Beethoven piano sonatas. Here are all the lectures on one page. (Beware: The metadata on these mp3 files is all over the map.) As an incompetent student of the Beethoven sonatas, I find these lectures absolutely riveting. Note: ...

Windows Vista changed the Alt+Tab order slightly

For decades, the Alt+Tab order was the same as the Z-order, but that changes in Windows Vista if you use the enhanced Alt+Tab feature known as Flip, which is on by default on most systems. There are three types of interactive task switching in Windows Vista: Classic Alt+Tab continues to show the icons in Z-order order, but the developer ...