The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

Jan 24, 2013
Post comments count 0
Post likes count 1

STRICT_TYPED_ITEMIDS is the shell namespace version of the STRICT macro used by USER and GDI

Raymond Chen

Starting with the Windows Vista PlatformSDK, defining the symbol before including shell header files changes declarations that previously had simply used now use one of various types which are more clear about what type of ID list is being used. Think of it as the macro for the shell. The more precise names emphasize the form of the ID list: These new types were introduced to help catch common programming errors when using the shell namespace. For example, if you try to pass an array of absolute pidls to , you will get a type mismatch compiler error because that method takes an , and the thing you ...

Jan 23, 2013
Post comments count 0
Post likes count 0

Eliot Chang’s list of things Asians hate

Raymond Chen

Where are you really from?

Jan 23, 2013
Post comments count 0
Post likes count 1

Why was WHEEL_DELTA chosen to be 120 instead of a much more convenient value like 100 or even 10?

Raymond Chen

We saw some time ago that the nominal mouse wheel amount for one click (known as a "detent") is specified by the constant , which has the value 120. Why 120? Why not a much more convenient number like 100, or even 10? Because the value 120 made it easier to create higher-resolution mouse wheels. As noted in the documentation: The delta was set to 120 to allow Microsoft or other vendors to build finer-resolution wheels (a freely-rotating wheel with no notches) to send more messages per rotation, but with a smaller value in each message. Suppose the original wheel mouse had nine clicks around its ci...

Jan 22, 2013
Post comments count 0
Post likes count 1

Heads-up: Phone scammers pretending to be JPMorgan Chase MasterCard security

Raymond Chen

Recently, a round of phone scammers have been dialing through our area with a caller-ID of (000) 000-0000, which should already raise suspicions. When you answer, a synthesized voice says that they are calling from JPMorgan Chase MasterCard security. They claim that your credit card has been disabled due to suspicious activity, and in order to reactivate it, you need to enter your 16-digit credit card number. I decided to see how far I could take the robot voice for a ride, so I entered 16 random digits. No luck, the robot voice knew about the checksum and asked me to enter it again. I did a quick search for...

Jan 22, 2013
Post comments count 0
Post likes count 1

Microspeak: pivot

Raymond Chen

A great word to use at Microsoft to make it sound like you're one of the cool insiders is pivot. Mostly because the meaning of the word varies from place to place, so you can use it to mean whatever you like while still sounding hip and jargony. In Windows Phone, the term pivot is a technical term which refers to a type of control that lets users switch easily from page to page. The term is used metonymically to mean the pages themselves. In the Calendar, on the To-Do pivot, you can press and hold on a to-do item and select postpone a day. In Excel, the term pivot refers to a type of table or chart that...

Jan 21, 2013
Post comments count 0
Post likes count 0

The 2013/2014 Seattle Symphony subscription season at a glance

Raymond Chen

The pocket reference guide for 2013/2014.

Jan 21, 2013
Post comments count 0
Post likes count 1

The changing name of the Microsoft event held in conjunction with Martin Luther King, Jr. Day

Raymond Chen

Today is Martin Luther King, Jr. Day, a federal holiday in the United States honoring the civil rights leader and formally serving as a day to reflect on the principles of racial equality and nonviolent social change and more generally to honor Dr. King's legacy through service. At Microsoft, the day has been recognized with an event whose name is, um, well, the name keeps changing. Here are the names from recent years: I like to think this is done intentionally just to keep people on their toes. Ironically, although the event "celebrates diversity and inclusion," the email announcing the event ina...

Jan 18, 2013
Post comments count 0
Post likes count 1

What is this rogue version 1.0 of the HTML clipboard format?

Raymond Chen

At least as of the time this article was originally written, the HTML clipboard format is officially at version 0.9. A customer observed that sometimes they received HTML clipboard data that marked itself as version 1.0 and wanted to know where they could find documentation on that version. As far as I can tell, there is no official version 1.0 of the HTML clipboard format. I hunted around, and the source of the rogue version 1.0 format appears to be the WPF Toolkit. Version 1.0 has been the version used by since its initial commit. If you read the code, it appears that they are not generating HTML c...

Jan 17, 2013
Post comments count 0
Post likes count 2

A brief history of the GetEnvironmentStrings functions

Raymond Chen

The Get­Environment­Strings function has a long and troubled history. The first bit of confusion is that the day it was introduced in Windows NT 3.1, it was exported funny. The UNICODE version was exported under the name Get­Environment­StringsW, but the ANSI version was exported under the name Get­Environment­Strings without the usual A suffix. A mistake we have been living with for over two decades. This is why the winbase.h header file contains these confusing lines: WINBASEAPI LPCH WINAPI GetEnvironmentStrings( VOID ); WINBASEAPI LPWCH WINAPI GetEnvironment...