The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

Why can't I create my dialog box? Rookie mistake #1
Feb 6, 2007
Post comments count 0
Post likes count 0

Why can't I create my dialog box? Rookie mistake #1

Raymond Chen
Raymond Chen

Each dialog box resource is specified either by an integer ordinal or by a string name. But a simple typo will turn one into the other. Do you see the two "classic rookie mistakes"? It may be easier to spot if you take the resource file and send it through the preprocessor first: The first call to passes as the resource name. But notice that there is no resource with that name. The preprocessor turned into thanks to the line in the header file. Therefore, the call to fails since there is no dialog box named . The dialog box you want goes by the integer name 1. The second mistake is more sub...

Bonus material for The Old New Thing (the book) is now available for download
Feb 6, 2007
Post comments count 0
Post likes count 1

Bonus material for The Old New Thing (the book) is now available for download

Raymond Chen
Raymond Chen

I've just been informed by my publisher that the bonus chapters from my book are now available for download. Click on "Sample Chapters". Sorry they're late. The source code for the programs in the book can be downloaded from the "Source Code" link. And on a more embarrassing note, there's that "Errata" link, too.

Public service announcement for United States taxpayers: In tax year 2006, you can claim a $30 refund if you owned a telephone
Feb 5, 2007
Post comments count 0
Post likes count 0

Public service announcement for United States taxpayers: In tax year 2006, you can claim a $30 refund if you owned a telephone

Raymond Chen
Raymond Chen

The United States government authorized a one-time refund of long-distance excise taxes paid between March 2003 and July 2006, but early returns suggest that many taxpayers are unaware of this refund. (Here's the IRS press release that goes into more detail and includes a list of most common mistakes people have been making.) The easy way to claim this is merely to take the standard deduction of $refund; the hard way is to collect all your telephone bills from that period and compute how much long distance excise tax you actually paid. This entry also illustrates how all the nitpicking from commenters ov...

Why did Explorer say "The target you specified is on the desktop"?
Feb 5, 2007
Post comments count 0
Post likes count 0

Why did Explorer say "The target you specified is on the desktop"?

Raymond Chen
Raymond Chen

In Windows 95, if you had a shortcut to a file on the desktop, view the shortcut's properties, and then clicked "Find Target", you got the message "The target you specified is on the desktop". It also selected the item on the desktop to help you find it. But why didn't it just open an Explorer window that viewed the desktop? Because in Windows 95, you couldn't display the desktop in an Explorer window. The only way to see the desktop was to minimize all your application windows. There wasn't a "Show Desktop" button in Windows 95 either. Therefore, the shortcut property sheet did as much as it cou...

The publicity machine doesn't stop: TechNet podcast interview
Feb 2, 2007
Post comments count 0
Post likes count 0

The publicity machine doesn't stop: TechNet podcast interview

Raymond Chen
Raymond Chen

The TechNet Magazine Podcast page has just posted their February 2007 entry, which includes an interview with little old me in the second half. I haven't listened to the whole interview yet, but what struck me immediately is that I was pretty darned punchy and goofy, whereas I think the host was trying to take a more serious tone. Oops.

Super Bowl Sunday: The day the entire country stops doing anything
Feb 2, 2007
Post comments count 0
Post likes count 0

Super Bowl Sunday: The day the entire country stops doing anything

Raymond Chen
Raymond Chen

This upcoming Sunday features an event that means absolutely nothing to people outside the United States: The Super Bowl. I call it an event because it is more than simply a football game. It's an American institution. Even people who think a nose guard is a piece of safety equipment will watch the game, or at least pretend to be interested in it for a few hours. At a party last year, I met someone who spent time as an emergency room doctor, and he told me that the entire hospital goes quiet when the Super Bowl is on. Patients don't come in. Inpatients don't call for nurses. Those who are already in the waitin...

The ironic thing about fixing a bug
Feb 2, 2007
Post comments count 0
Post likes count 0

The ironic thing about fixing a bug

Raymond Chen
Raymond Chen

The ironic thing about fixing a bug, or at least once I mention on this web site that I fixed a particular bug, is that people immediately complain that I didn't fix some other bug. One school of complaint believes that cosmetic bugs should be fixed first: "You suck. I mean, look at these egregious cosmetic bugs. If you can't get even those right, then obviously you can't get the other stuff right either." The opposite school believes that cosmetic bugs should be fixed last: "You suck. I mean, why are you fixing cosmetic bugs when there are these other bugs!" But at least both camps agree on one thing: I suck...

The network interoperability compatibility problem, second follow-up
Feb 1, 2007
Post comments count 0
Post likes count 0

The network interoperability compatibility problem, second follow-up

Raymond Chen
Raymond Chen

I post this entry with great reluctance, because I can feel the heat from the pilot lights of the flame throwers all the way from here. The struggle with the network interoperability problem continued for several months after I brought up the topic. In that time, a significant number of network attached storage devices were found that did not implement "fast mode" queries correctly. (Buried in this query are some of them; there are others.) Some of them were Samba-based whose vendors did not have an upgrade available that fixed the bug. But many of them used custom implementations of CIFS; consequently, any Sam...

If you ask an author to sign a book, you have to tell him/her what to write
Jan 31, 2007
Post comments count 0
Post likes count 0

If you ask an author to sign a book, you have to tell him/her what to write

Raymond Chen
Raymond Chen

If you happen to catch me, say by stopping by my office if you happen to work at Microsoft, I'd be happy to sign your copy of my book. (There's no need to set up a formal book signing appearance in building 9; just stop by my office any time.) One of the things you don't realize as a fan waiting in line at a book signing is that when you get to the front of the line, you have to tell the author what to write. It's obvious once you think about it. The author doesn't know anything about you. You're just one person out of hundreds they're going to sign for today. How should they know what to write? So don't...