Raymond Chen

Raymond has been involved in the evolution of Windows for more than 30 years. In 2003, he began a Web site known as The Old New Thing which has grown in popularity far beyond his wildest imagination, a development which still gives him the heebie-jeebies. The Web site spawned a book, coincidentally also titled The Old New Thing (Addison Wesley 2007). He occasionally appears on the Windows Dev Docs Twitter account to tell stories which convey no useful information.

Post by this author

Converting from traditional to simplified Chinese, part 1: Loading the dictionary

One step we had glossed over in our haste to get something interesting on the screen in our Chinese/English dictionary program was the conversion from traditional to simplified Chinese characters. The format of the hcutf8.txt file is a series of lines, each of which is a UTF-8 encoded string consisting of a simplified Chinese character ...

The best book on ActiveX programming ever written

I was introduced to the glory that is the world of Mr. Bunny many years ago. Mr. Bunny's Guide to ActiveX is probably the best book on ActiveX programming ever written. If you haven't figured it out by now, it's a humor book, but it's the sort of madcap insane geek humor that has enough truth in it to make you laugh more. My favorite is ...

How can I recover the dialog resource ID from a dialog window handle?

Occasionally, I see someone ask a question like the following. I have the handle to a dialog window. How can I get the original dialog resource ID that the dialog was created from? As we saw in our in-depth discussion of how dialogs are created from dialog templates, the dialog template itself is not saved anywhere. The purpose of a ...

What struck me about life in the Republic

When people asked me for my reaction to the most recent Star Wars movie, I replied that what struck me most was that the Republic doesn't appear to have any building codes. There are these platforms several hundred meters above the ground with no railings. For example, Padmé Amidala's fancy apartment has a front porch far above the ...

What are SYSTEM_FONT and DEFAULT_GUI_FONT?

Among the things you can get with the function are two fonts called and . What are they? They are fonts nobody uses any more. Back in the old days of Windows 2.0, the font used for dialog boxes was a bitmap font called System. This is the font that retrieves, and it is still the default dialog box font for compatibility reasons. ...

What’s the point of DeferWindowPos?

The purpose of the DeferWindowPos function is to move multiple child windows at one go. This reduces somewhat the amount of repainting that goes on when windows move around. Take that DC brush sample from a few months ago and make the following changes: HWND g_hwndChildren[2]; BOOL OnCreate(HWND hwnd, LPCREATESTRUCT lpcs) { const ...

Answers to yesterday’s holiday fun puzzles

Puzzle 1: This was a word search consisting of the names of the twelve streets of central downtown Seattle. The unused letters spell out the message "Issaquah year's supply hair conditioner", which takes you to the Issaquah Costco. (In the real puzzle, the secret message was much odder but relied on an inside joke.) Puzzle 2: The ...

Using script to query information from Internet Explorer windows

Some time ago, we used C++ to query information from the ShellWindows object and found it straightforward but cumbersome. This is rather clumsy from C++ because the ShellWindows object was designed for use by a scripting language like JScript or Visual Basic. Let's use one of the languages the ShellWindows object was designed for to ...

Some holiday fun: Puzzle supplementary material

(Note: This makes sense only after you've gone through the other puzzles.) In case my friend got stuck, she could call me and ask for a hint. The original plan was that I would charge her a dare in order to get a hint, but it turns out I was too nice a guy to make her do any of the following things, but here's the list anyway...

Some holiday fun: Puzzle #6

(Note: Read the puzzles in order from 1 to 6 for them to make sense.) To see the final puzzle you need an SVG- or VML-enabled browser. S H O R T S T O P P H T T R...