The Old New Thing
Practical development throughout the evolution of Windows.
Latest posts

On understanding that getting married comes with changes in lifestyle

A friend of mine who had been married less than a year received a phone call from Adam, one of his still-single friends: "Hey, Joe! Irving and I are going into town, hit some bars, hang out at some clubs, wanna come along?" My friend replied, "Hang on a second." A beat. "Nope. Still married!" As far as I know, Adam and Irving are still single.

Why is the origin at the upper left corner?

Because early geeks didn't study math.

Which ferry should we take from Germany back to Denmark? Oh, it's this one, except for that one word I don't understand

Writing that entry last Friday reminded me that I never did share my stories of that emergency vacation, save for a cryptic list of learnings. Here's a little story about the ferry crossing. Part of the trip involved driving from Copenhagen (København) to Munich (München), which means taking a ferry. (It's faster than driving down the peninsula.) Realizing that we would also have to take the ferry on the return trip on Saturday, we grabbed a ferry schedule during a rest stop in Denmark. What we didn't realize until it was time for the return trip was that the schedule was (naturally) in Danish, a...

Non-psychic debugging: Why you're leaking timers

I was not involved in this debugging puzzle, but I was informed of its conclusions, and I think it illustrates both the process of debugging as well as uncovering a common type of defect. I've written it up in the style of a post-mortem. A user reported that if they press and hold the F2 key for about a minute, our program eventually stops working. According to Task Manager, our User object count has reached the 10,000 object limit, and closer inspection revealed that we had created over 9000 timer objects. We ran the debugger and set breakpoints on and to print to the debugger each timer ID as it was cr...

2010 Q3 link clearance: Microsoft blogger edition

It's that time again: Sending some link love to my colleagues.

Why doesn't the TAB key work on controls I've marked as WS_TABSTOP?

A customer had a programming problem regarding tab stops: I create a parent window (child of main frame) as below This window hosts 2 toolbar windows. Each toolbar window has the style set using . MSDN states WS_EX_CONTROLPARENT Allows the user to navigate among the child windows of the window by using the TAB key. But I am not able to use TAB to navigate to second toolbar. I tried handling and return . But this message is not sent to parent. I can try subclassing the toolbar to handle TAB key, but if I do that, then what's the point of the and styles? You already know how to solve this cus...

We apologize for the delay, but there is an issue with the music

After the opening work of the Seattle Symphony concert last Saturday night, the orchestra members rearranged themselves to play the Foote, but conductor Gerard Schwarz didn't come out onto the stage. The delay grew and people started wondering what was going on. An announcement was made over the public address system: "We apologize for the delay, but there is an issue with the music." This only created more confusion. What does "an issue with the music" mean? Eventually, Schwarz took the podium and explained what happened. It turned into a game of good news/bad news. "The good news is that one of the orchest...

Where did my mail control panel icon go?

A customer ran into the following problem: I was trying to add another email account to Outlook, and the instructions say that I should go to the mail icon in the Control Panel, which to my surprise is nowhere to be found! How can I figure out what went wrong? A little bit of psychic debugging will solve this. The customer was running Windows Vista, 64-bit edition. On 64-bit versions of Windows XP and Windows Vista, the Control Panel shows only 64-bit control panels. The 32-bit control panels are off in a separate 32-bit control panel, which you can find by clicking the View 32-bit Control Pan...

Speculation around Microsoft Company Meeting 2010

Today is Microsoft's annual Company Meeting. Back in August, the Real Estate and Facilities department sent a message to our group of buildings to inform us that the locker rooms would be closed "due to the filming of an upcoming corporate initiative." Speculation swirled as to what sort of "upcoming corporate initiative" would require filming in a locker room. The Company Meeting was only a month away, and I suggested that Steve Ballmer might be filming a (shudder) parody of the Old Spice Guy commercial. Picking up the ball, one of my colleagues wrote the proposed script for this parody: Hello developers. ...