Showing archive results for 2008

Jul 10, 2008
Post comments count0
Post likes count1

What’s the deal with that alternate form for menu item template separators?

Raymond Chen

We saw last time that you can specify a separator in a menu item template by specifying zero for everything, even though technically you're supposed to pass MFT_SEPARATOR for the flags. What's the deal with that alternate form for menu item template separators? This goes back to the early days of the InsertMenu function (and its friends like Ap...

History
Jul 9, 2008
Post comments count0
Post likes count0

Warning: This cereal may contain traces of spiders

Raymond Chen

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

Non-Computer
Jul 9, 2008
Post comments count0
Post likes count1

The evolution of menu templates: 16-bit classic menus

Raymond Chen

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

History
Jul 8, 2008
Post comments count0
Post likes count0

Wikipedia has created its own reactionary subculture

Raymond Chen

Now that Wikipedia has catapulted the wiki into the general consciousness, where there's a wiki, a spoof of a wiki can't be far behind.

Non-Computer
Jul 8, 2008
Post comments count0
Post likes count1

The evolution of menu templates: Introduction

Raymond Chen

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

History
Jul 7, 2008
Post comments count0
Post likes count1

Why is the LOADPARMS32 structure so messed up?

Raymond Chen

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/M, co...

History
Jul 4, 2008
Post comments count0
Post likes count0

Double the usual number of fire alarms today

Raymond Chen

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

Non-Computer
Jul 4, 2008
Post comments count0
Post likes count0

When anybody can look up your name in the company directory and pay a visit

Raymond Chen

In late 2004, I was working in my office, minding my own business. I normally keep my door open, as do most other people. «Knock-knock» I turn around. There's somebody at the door. "Oh, nothing," the person said. "I just wanted to look at you." I closed the door and drew my blinds. What would you have done? (In retrospe...

Non-Computer
Jul 3, 2008
Post comments count0
Post likes count1

How did the invalid floating point operand exception get raised when I disabled it?

Raymond Chen

Last time, we learned about the dangers of uninitialized floating point variables but left with a puzzle: Why wasn't this caught during internal testing? I dropped a hint when I described how s work: You have to ask the processor to raise an exception when it encounters a signaling NaN, and the program disabled that exception. Why was an excepti...

Code