The Old New Thing

Win32 user interface work is inherently single-threaded

At the end of the day, there's a window handle in there. As we saw a few years ago, windows have thread affinity. You can push work to a background thread all you want, but once you send a message to the window (or do something that results in a message being sent to the window), you've given control to the UI thread. Since the shell is all...

The wrong way to check whether the mouse buttons have been swapped

Back in the late 1990's, the window manager team received a bug that said that sometimes the mouse button state got messed up and the computer acted as if the buttons were stuck down. Further investigation revealed that it occurred only when one particular program was running, and only if the user had enabled mouse button swapping. The ...

How do I delay the automatic logon process?

To solve some problems you need to place one foot outside the box. We have a number of kiosk machines that are networked wirelessly. Each machine is configured with automatic logon so that things return to normal after power is restored after an outage. The problem is that the wireless switch takes a long time to recover from a power failure...

Nicolas Bourbaki, perhaps the biggest inside joke in mathematics

If you've studied advanced mathematics, you've certainly read or at least heard about the books and papers of the great French mathematician Nicolas Bourbaki, whose works in the 1930's set out a rigorous formulation of modern mathematics. Except he never actually existed. The name was created as a front for a group of renegade French ...

Why aren't shortcuts as easy as unix links?

Commenter dingo asks, "Why are shortcuts so hard to manipulate? Why can't they be as easy as unix links?" Well, if you want something like unix links, then you can just create a hard link. Creating them is about the same difficulty ( vs ) and manipulating them is the same since you don't actually manipulate a hard link. You just use it like a...

Not the best way to start out a form letter

Special Welcome Back Offer From the President of The Wall Street Journal Online Dear Do Not Edit These Fields, My name is Todd Larsen and I'm the president of THE WALL STREET JOURNAL ONLINE... Pre-emptive snarky comment: I got a lame form letter from Microsoft once...

No good deed goes unpunished: Free code samples

There's no such thing as a free lunch. Or free code either. Many years ago, I wrote some samples for the SDK as a favor, and at each major SDK release, I am reminded that no good deed goes unpunished. I can tell when a major SDK release is coming, because I get a piece of mail that goes something like this: Hi. You are on file as the owner ...

Unlikely excuses: A faulty microchip

Last year, a talking action figure was discovered to utter a curse word. A spokesperson for the store said that the problem might be a faulty microchip. Huh? What microchips fail by saying curse words? I mean, I can see the voice chip failing by generating static or chopping up the audio so as to become unintelligible, but what are the odds...

Whose idea was it to make Ctrl+Backspace delete the previous word?

James Manning mentioned in a footnote to a blog entry on PowerShell and WMI that he considers the Ctrl+Backspace shortcut key a Windows-ism. Where did this shortcut key come from? From a fan of the Brief editor. A few people in the early days of the Internet Explorer group used the Brief editor, which uses Ctrl+Backspace as the shortcut ...