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

If the shell is written in C++, why not just export its base classes?

ton suggested that since the shell is written in C++, should have been an abstract class, and then it could have used techniques like exceptions and Inversion of Control. Okay, first of all, I'm not sure how Inversion of Control is something that requires C++, so I'm going to leave that aside. Second of all, who says the shell is written in C++? As it happens, when was introduced in Windows 95, the entire shell was written in plain C. That's right, plain C. Vtables were built up by hand, method inheritance was implemented by direct replacement in the vtable, method overrides were implemented by funct...

The video of Microsoft Store employees dressed in Windows colors, revealed by a falling curtain, gee that looks familiar, somehow

One of my former colleagues tipped me off to this video of the Grand Opening of the newest Microsoft Store, specifically calling out this moment at timecode 0:48 of a curtain dropping, revealing cheering employees dressed in Windows colors, which seemed familiar, somehow. Oh right, because I did the same thing over fifteen years ago, at timecode 5:25 in this video.

The PSN_SETACTIVE notification is sent each time your wizard page is activated

A customer had received a number of crashes via Windows Error Reporting and believed that they had found a bug in the tree view common control. In our UI, we have a tree view with checkboxes. The tree view displays a fixed item at the top, followed by a variable number of dynamic items. When the user clicks Next, we look at the tree view to determine what the user selected. The code goes like this (pseudo): In the crashes we receive, other variables in the program indicate that there should be only one dynamic item, but our loop iterates multiple times. Furthermore, the first time through the loop, the i...

No, modifying the DLLs that come with Windows is not supported

From the I can't believe I had to write that file comes this question from a customer: Our customer is modifying the ABC.DLL file that comes with Windows in order to accomplish XYZ. Is this supported? No, of course this isn't supported. I can't believe I had to write that. if you modify a system file, then the thing you're running isn't Windows any more but is rather some sort of operating system that resembles Windows in many significant ways. (Imagine the extreme case of this: The customer modifies NTOSKRNL.EXE, KERNEL32.DLL, USER32.DLL, etc. so that they happen to be byte-for-byte identical to the files th...

Why do some infotips repeat the name of the item as well as the infotip?

A customer noticed that when the user hovered over their application name in the Start menu, the infotip that pops up includes their product name: ... but no other program on the Start menu included the product name in the description: The customer compared their shortcut with the other ones but couldn't find anything that was telling Explorer, "Include the program name in the pop-up infotip, please." Because the reason for the name being included in the infotip had nothing to do with the properties stored in the shortcut. The reason the name was included in the infotip is that the name was being truncated i...

Seeing the world through arbitrage-colored glasses

On the mailing list with a negative service level agreement, one of my colleagues posted the message Free Nerf guns in my office. I've decided I'm no longer a collector. Not one to miss the opportunity to cause some trouble, another colleague posted the message Nerf guns for sale: $1 each. Get'em while they're hot. That earned a chuckle from me.

Why is there a CSIDL_DESKTOP value if you need the desktop in order to get it anyway?

John asks why there is a special constant defined for the desktop. After all, in order to use , you need to call and then bind to it. What's the point of having an that represents the desktop if, in order to use it, you first need to get the desktop? It's like asking why the file system uses (dot) to refer to the current directory. You're already in the current directory. In order to resolve (dot), you already need to have the current directory, so why bother with the dot at all? Because it is often convenient to give a name to your starting point. Suppose somebody wants to save a file to the desktop...

When your vice president tells you to stop replying to a mail thread, you probably should stop replying to the mail thread

Some time in the early part of this century, somebody sent a message to the Windows NT Development Announcements mailing list at Microsoft. It went something like, "My car was parked in «location X» and somebody ran into it and didn't leave a note. Does anybody have any information about this?" Now, one thing you need to know is that the Windows NT Development Announcements mailing list has the entire Windows division as members. We're talking thousands of people. And the sort of announcements sent to the alias are not the "somebody dinged my car" type of announcements. They are announcements li...

The question mark lets you make up anything you like

A trend I've noticed in journalism is to make some sort of outrageous statement, but then stick a question mark at the end to disavow any responsibility for the statement. By changing it to a question, you're avoiding actually having to back up what you write. "I'm not saying this is actually true. I'm just raising the question." For example, a headline might read "The sign of something new?" The author doesn't want to actually back up the claim that the subject is the sign of something new, so he'll just say it with a question mark. Now the responsibility to support or refute the claim has been shifted to you, ...