The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

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...

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

How do I create a TaskDialog with a progress bar but no cancel button?

Raymond Chen

A developer from another group within Microsoft wanted to create a with a progress bar, but they couldn't figure out how to get rid of the Cancel button. "Is there a way to remove all the buttons from a Task Dialog?" Um, users hate it when you give them a window that cannot be closed or cancelled. What should the user do if the reticulation server stops responding? Shut down the computer? (Hey, at least shutting down the computer will actually work.) "The process usually takes around two seconds, and we time out after ten. In the case of timeout, we replace the progress dialog with a failure dialog w...

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

If there were some sort of award for alternative commuting, we would’ve been eligible

Raymond Chen

A few projects ago, I worked on a team whose members came to work by a wide variety of modes. If there were some sort of award for alternative commuting, we would've been eligible. One of the full-time telecommuters was based in Spain, which was handy because he was available to deal with issues that cropped up while everybody in Redmond was sleeping. Perhaps to compensate for all the gasoline being saved by his employees, our manager drove an oversized pick-up truck to work.

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

State law requires you to watch this video of a singing hippo

Raymond Chen

I did it briefly a few years ago, but I'm going to make it a regular Monday feature, at least for this year: Blogging my dreams. I dreamed that I was back in my high school English class, and due to some new state law, everybody was required to watch this video of a singing hippo. The hard part was walking four miles to the nearest viewing location, seeing as we didn't even have a TCP/IP standard yet, much less YouTube. To think that this is the culmination of the technological advances of the last three decades: Being able to watch a singing hippo on demand.

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

How can I write a script that finds my top-rated photos?

Raymond Chen

I'm not sure if I'll be able to keep it up, but I'm going to see if I can make Monday "Little Programs" day, where I solve simple problems with little programs. Today's little program is a script that goes through your Pictures folder and picks out your top-rated photos. The key step here is extracting the rating, which goes by the name System.Rating in the shell property system. The method which does the extraction is Shell­Folder­Item.Extended­Property. var shell = new ActiveXObject("Shell.Application"); var picturesFolder = shell.Namespace(39); // CSIDL_MYPICTURES var items = picturesFolde...