The Old New Thing

Why can't you programmatically reorder the items on the Start menu?

The classic Start menu and the "All Programs" portion of the Windows XP Start menu permit you to customize the order of the shortcuts that appear there. You can use drag/drop to rearrange them, or force them to be sorted by name. But why is there no programmatic interface to these actions? Because the power would be used for evil far ...

Understanding what significant digits really mean

A double-precision floating point number carries fifteen significant digits. What does this really mean? I multiplied 0.619207 by 10,000,000 and got 6192069.999999991 instead of 6192070. That's only six significant digits; where's my fifteen? Talking about significant digits is really just a shorthand for talking about relative precision. "...

Window class properties apply to all windows that belong to the class

Window class properties apply to all windows that belong to the class. That's why they're called class properties. This seems like an obvious thing to say when put in so many words, but I see many "solutions" that lose sight of this simple fact. All the properties that you set in the (or ) are window class properties, as are the properties...

Pitfalls of transparent rendering of anti-aliased fonts

Windows provides a variety of technologies for rendering monochrome text on color displays, taking advantage of display characteristics to provide smoother results. These include grayscale anti-aliasing as well as the more advanced ClearType technique. Both of these methods read from the background pixels to decide what pixels to draw in the...

Lies and statistics: 600,000 Chinese engineers

Everybody "knows" that China produced 600,000 engineers in 2004 (as compared to 70,000 in the United States), but Carl Bialik at the Wall Street Journal [corrected 9:30am] smelled something funny, so he chased the source of the numbers to see whether this "fact" was indeed true. It wasn't. NPR interviewed a Duke professor whose class ...

Fumbling around in the dark and stumbling across the wrong solution

I don't mean to pick on this series of entries, but it illustrates an interesting pattern of stumbling across the wrong "solution". The series begins by attempting to trigger the system's monitor blank timeout by posting a message to the desktop window. As we saw earlier, the desktop window is a very special window and as a rule should be...

Remember what happens when you broadcast a message

Occasionally I catch people doing things like broadcasting a message to all top-level windows. This is one of those things that is so obviously wrong I don't see how people even thought to try it in the first place. Suppose you broadcast the message What happens? Every top-level window receives the message with the same parameters, ...