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

Getting a custom right-click menu for the caption icon

Explorer does it. Now you can too. It's a simple matter of detecting a context menu on the caption icon and displaying a custom context menu. Here are the simple changes to our scratch program to display a rather pointless one-item menu. When we receive a WM_CONTEXTMENU ...
Comments are closed.0 0
Code

Being the Nobel Peace Prize

For Hallowe'en this year, I'm going to be the Nobel Peace Prize. (I like being things that people would never even think of as a possible Hallowe'en costume. Last year, I was an inter-office envelope. People addressed me from place to place.) I chose the Nobel Peace Prize in part because...

Kinder Überraschungen

Laura John entertains her colleagues with Kinder Surprise eggs. I love these things. I understand that Kinder Surprise eggs are illegal in the US for two reasons. Whenever I go to Germany I smuggle some Kinder Überraschungen into the States. (Yes...

Why Daylight Savings Time is nonintuitive

Daylight Savings Time ends this weekend in most of North America and Europe, so it seems a good time to discuss the whole problem of Daylight Savings Time and timestamps.

Writing a sort comparison function

When you are writing a sort comparison function (say, to be passed to ListView_SortItems or *gasp* to be used as an IComparer), your comparison function needs to follow these rules: Reflexivity: Compare(a, a) = 0. Anti-Symmetry: Compare(a, b) has the opposite sign of Compare(b, a), where 0 is considered to be its own opposite. Transitivity...
Comments are closed.0 0
Code

What's the deal with those reserved filenames like NUL and CON?

Set the wayback machine to DOS 1.0. DOS 1.0 didn't support subdirectories, lowercase, or filenames longer than 8.3. When you ran the assembler (or compiler if you were really fancy) the conversation went something like this: A>asm foo    the ".asm" ...

Using the TAB key to navigate in non-dialogs

The IsDialogMessage function works even if you aren't a dialog. As long as your child windows have the WS_TABSTOP and/or WS_GROUP styles, they can be navigated as if they were part of a dialog box. One caveat is that IsDialogMessage will send DM_GETDEFID and DM_SETDEFID messages to your window, which are ...
Comments are closed.0 0
Code

What is the Alt+Tab order?

What determines the order in which icons appear in the Alt+Tab list? The icons appear in the same order as the window Z-order. When you switch to a window, then it comes to the top of the Z-order. If you minimize a window, it goes to the bottom of the Z-order. The Alt+Esc hotkey (gosh, does ...

The more I learn about Sweden, the weirder it gets

It must be really boring in Sweden in the winter. Things to do: Military service in Sweden is compulsory for all males. When your country has not participated in any wars for two hundred years, you have to pass the time somehow. Apparently one of the ...

Curling anyone?

The Granite Curling Club is having their annual open house today, October 18th 2003, from 2pm to 8pm. The Seattle facility is the only dedicated curling facility in the United States west of the Rockies. Bring sweatpants, flat-soled shoes, and $5. They'll provide the brooms and duct tape. I became fascinated with curling many ...

Feedback usabilla icon