The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

The Notepad file encoding problem, redux
Apr 17, 2007
Post comments count 0
Post likes count 1

The Notepad file encoding problem, redux

Raymond Chen
Raymond Chen

About every ten months, somebody new discovers the Notepad file encoding problem. Let's see what else there is to say about it. First of all, can we change Notepad's detection algorithm? The problem is that there are a lot of different text files out there. Let's look just at the ones that Notepad supports. 8-bit ANSI (of which 7-bit ASCII is a subset). These have no BOM; they just dive right in with bytes of text. They are also probably the most common type of text file. UTF-8. These usually begin with a BOM but not always. Unicode big-endian (UTF-16BE). These usually begin with a BOM but not always. Unico...

See the Seattle Symphony on television in high definition
Apr 16, 2007
Post comments count 0
Post likes count 0

See the Seattle Symphony on television in high definition

Raymond Chen
Raymond Chen

If you missed it on Saturday and Sunday night, you have a few more chances left. Set your DVR to record Seattle Symphony from Benaroya Hall: Brahms, Kernis and Kodály on one of its handful of repeat airings this week (the next one is tonight at 6pm on KCTS-HD). According to the story in the Seattle Times, it includes close-ups of nearly every member of the orchestra so you can watch their fingerwork or their facial expressions, plus a behind-the-scenes cam so you can finally find out what the conductor and soloist are doing when they step backstage during the curtain calls.

Changes to power management in Windows Vista
Apr 16, 2007
Post comments count 0
Post likes count 0

Changes to power management in Windows Vista

Raymond Chen
Raymond Chen

As I noted some time ago, it's hard to get programmers excited about power management. What's worse, programs that do take the effort to care about power management often do it rudely, hijacking your computer and preventing you from going into standby or hibernation, instead preferring to drain your battery until the computer just dies from lack of power. The Power Management folks decided that they've had enough with these selfish programs and redesigned the way power management works. In addition to exposing finer control over various aspects of power management to the user, they also decided to "take the b...

Email tip: People didn't answer your first email for a reason
Apr 13, 2007
Post comments count 0
Post likes count 0

Email tip: People didn't answer your first email for a reason

Raymond Chen
Raymond Chen

It is said that insanity is doing the same thing over and over again and expecting different results. Consider: From: X To: Group Y Question blah blah blah. A day or two later: From: X To: Group Y Resending due to no response. ------- Original Message ------- From: X To: Group Y Question blah blah blah. You didn't get a response because your previous message was poorly-phrased, or it was sent to the wrong group, or nobody recognized the question as something they could help with, or any of a number of possible reasons. Re-sending it is not going to fix that. If your question was poorly-phrased, it's st...

What is the default version of the shell common controls?
Apr 12, 2007
Post comments count 0
Post likes count 0

What is the default version of the shell common controls?

Raymond Chen
Raymond Chen

It depends on what you mean by default. As we saw earlier, the convention for Windows header files is that if you don't specify a particular version, then you get the most recent version. The shell common controls header file follows this convention, so if you include the Windows XP version of , you get functions, messages, and structures designed for use with version 6 of the common controls. (And functions, messages, and structures may not work with version 5 of the shell common controls due to changes in structure sizes, for example.) So from the Windows XP Platform SDK header file's poin...

Oh no, I have an obstructed view of Joshua Roman!
Apr 11, 2007
Post comments count 0
Post likes count 0

Oh no, I have an obstructed view of Joshua Roman!

Raymond Chen
Raymond Chen

This past weekend, a group of us attended a subscription concert performance of Beethoven's Missa Solemnis at Benaroya Hall. We collectively hold a block of seats, and it's a mix of regulars and rotating guests. Our seats are close to the stage, made even closer by the hall reconfiguration to accommodate the choir and soloists; we were effectively in the first row. (And if you were wondering what those covered holes in the floor are up near the stage, they're where the supports go for the stage extension.) As we filed into our seats, one of our guests for this particular concert exclaimed in mock consternation,...

What's the difference between WINVER, _WIN32_WINNT, _WIN32_WINDOWS, and _WIN32_IE?
Apr 11, 2007
Post comments count 0
Post likes count 0

What's the difference between WINVER, _WIN32_WINNT, _WIN32_WINDOWS, and _WIN32_IE?

Raymond Chen
Raymond Chen

Okay, so there are all these different ways you can specify what version of the Windows header files you want.† Let's take them in order. The symbol is the earliest one. That's the symbol that 16-bit Windows used to control the versioning of its header files, and its use carried forward into the 32-bit header files, presumably from the people who did the initial conversion of the header files to 32-bit and who grew up with the symbol. This symbol is still used a lot in the header files that can trace their origins to 16-bit Windows, such as , , and . The symbol came next. I'm not sure where it ...

Enjoy our Bluetooth devices with a glass of beer or wine (Bluetooth device optional)
Apr 10, 2007
Post comments count 0
Post likes count 0

Enjoy our Bluetooth devices with a glass of beer or wine (Bluetooth device optional)

Raymond Chen
Raymond Chen

Taiwanese Bluetooth technology company Bluetake has an odd picture on their front page. It's three women drinking alcohol, with plenty more bottles in front of them. Not a single Bluetooth device in sight. Maybe Bluetooth just makes alcohol taste better. (Yes, I know it's a stock photo, but what's with the alcohol?)

What’s the row of numbers on the copyright page of books?
Apr 10, 2007
Post comments count 0
Post likes count 0

What’s the row of numbers on the copyright page of books?

Raymond Chen
Raymond Chen

It tells you which printing you have.