The Old New Thing
Practical development throughout the evolution of Windows.
Latest posts
Early versions of Aero Peek: Aladdin, Bat Signal, and Squeegee
The feature now known as Aero Peek wasn't born that way. It went through several iterations before becoming what eventually shipped in Windows 7. At the MIX09 conference, Stephan Hoefnagels showed some of the precursors to Aero Peek. Here are the highlights, and the corresponding time codes if you want to jump straight to the demos. Thumbnails in the taskbar (time code 30:20) How it worked: Instead of labeled icons, the taskbar showed miniatures of the windows themselves. How it got its name: Um, it was just named after what it was. Why it failed: When shrunk to taskbar s...
Mom and dad's event-filled first day of school
I dreamed that my wife and I had dropped our daughter off at her new school for the first time, and I made a wrong turn and ended up going the wrong way. We got off at an exit for highway I-5, and the on-ramp turned into a two-lane highway hundreds of feet in the sky. To keep people from going too fast, the road rolled back and forth: First it tilted to the right, then to the left, and so on. (Imagine your hand making the "so-so" gesture.) You just had to drive carefully. The road dead-ended at a building, so we parked the car and got out. It was a tiny gift shop with puppets and marionettes. The attendant came...
Programmatically editing the metadata of an audio file
Today's Little Program edits the metadata of an audio file, ostensibly to correct a spelling error, but really just to show how it's done. Today's smart pointer class library is... (rolls dice)... CComPtr! We open with two helper functions which encapsulate the patterns Get property from property store Call Convert into desired final type Destroy the Set property in property store Create a Call Destroy the Both functions use a lambda to do the type-specific work. Here are some functions that will use the helpers: The function returns an array of po...
How to rescue a broken stack trace on x64: Recovering the stack pointer
No threading, just return addresses.
Why are my posted messages getting lost when the user drags my window around?
This question was inspired by an actual customer question, but I changed a lot of it around to make for a more interesting story. (Trust me, the original story was even more boring.) A customer's background thread posted a message to the main UI thread to signal something (details not important). They found that the posted message was never received if the user was in the process of dragging the main window around at the time the message was posted. Why would dragging a window cause posted messages to be lost? "We used to post a thread message, but then we saw that thread messages are eaten by modal loops, so...
How permanent is the "Remove from this list" action on the Start menu?
From Windows XP to Windows 7, the Start menu showed the programs it thinks you've run most frequently, by employing a conceptually simple but complicated-in-practice algorithm. You can right-click an item on the menu and select Remove from this list. What exactly does this option do? Does it reset the points back to zero, or does it ban the program from the Start menu for all eternity, or something in between? It resets the points back to zero and marks the program as has never been run by the user. This causes it to vanish from the frequently-used list, but if you start running it, it will start ea...
If your product is client-managed, how do you sell the server?
A friend of mine told me about a project he worked on two decades (and three employers) ago. Let's call it Project Nosebleed. Their project used a client-managed database: You have a central file server that houses the database files, which were in a proprietary file format that only the clients understood. All the client applications open the database files, coördinating¹ access among themselves by using file and record locking primitives. All you needed the server for was a place to house the files. It could have been a NAS server for all anybody cared. (Well, except that the concept of NAS hadn't tak...
If you had to deal with preschoolers all day, you'd need a nap too
Today, I'm turning it around: This is a dream that one of my friends had about me! She dreamed that she took her camera to school to take some pictures, possibly for the yearbook. She was somewhat surprised to discover that I was the new preschool teacher. When she popped in to my classroom to get a couple of pictures of me, she wasn't able to take any: Apparently, my new position was so exhausting that I'd had to take a nap on the king-size classroom bed...
What is the official name of the most popular work visa in the United States?
The most popular work visa in the United States is the H1-B visa. But have you looked at its official name? H-1B Specialty Occupations, DOD Cooperative Research and Development Project Workers, and Fashion Models (Today is Labor Day, a holiday in the United States which celebrates the end of summer. Not really, but that's what it has turned into.)