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

Loading the dictionary, part 1: Starting point

The first thing we'll need to do in our little dictionary program is to load the dictionary into memory. The format of the dictionary file is as a plain text file, each line of which is of the form Since it was the Big5 dictionary we downloaded, the Chinese characters are in Big5 format, known to Windows as code page 950. Our program will...

Developing a Chinese/English dictionary: Introduction

The other day, one of my colleagues mentioned that his English name "Ben" means "stupid" in Chinese: 笨/bèn/ㄅㄣˋ. (His wife is Chinese; that's why he knows this in the first place.) Knowing that the Chinese language is rich in homophones, I fired up my Chinese/English dictionary program to see if we could find ...

How to query properties of the taskbar

Occasionally, people want to query properties of the taskbar. I don't quite understand why; you should just get on with your life and let the taskbar get on with its life. After all, there might not even be a taskbar, as we discussed last time. But if you really want to know (perhaps you're collecting usability data), here's how: This ...

How do I cover the taskbar with a fullscreen window?

For some reason, people think too hard. If you want to create a fullscreen window that covers the taskbar, just create a fullscreen window and the taskbar will automatically get out of the way. Don't go around hunting for the taskbar and poking it; let it do its thing. As always, start with the scratch program and add the following: ...

When people ask for security holes as features: Stealing passwords

Sometimes people ask for features that are such blatant security holes I don't know what they were thinking. Is there a way to get the current user's password? I have a program that does some stuff, then reboots the system, and I want to have the current user's password so I can log that user back in when I'm done, then my program can resume ...

Managing the UI state of accelerators and focus rectangles

The three UI state messages: WM_CHANGEUISTATE, WM_QUERYUISTATE and WM_UPDATEUISTATE.

Another dead computer: My personal laptop

I'm kind of surprised at how much people reacted to my previous dead computer story. I guess there's an audience for stories about dead computers. Today's dead computer is my Sony Vaio PCG-Z505LE laptop, with a 600MHz processor and 192MB of RAM. Certainly a big step up from that 486/50 with 12MB of RAM. Laptop computers have a comparatively...

Building a dialog template at run-time

We've spent quite a bit of time over the past year learning about dialog templates and the dialog manager. Now we're going to put the pieces together to do something interesting: Building a dialog template on the fly. What we're going to write is an extremely lame version of the function. Why bother writing a bad version of something that...

Rescuing thread messages from modal loops via message filters

The WH_MSGFILTER hook lets you snoop on messages as they travel through modal loops.

Watching thread messages disappear

A sample program that loses thread messages.