The Old New Thing
Practical development throughout the evolution of Windows.
Latest posts
Wedding + two-year-old flower girl = wildcard
I was in San Francisco this weekend for a wedding. The flower girl was the bride's two-year-old niece, and when you add a two-year-old to the wedding party, you never know what's going to happen, because two-year-olds don't understand the world the same way adults do. During the unity candle ceremony, the two-year-old pushed her way to the table, joining the bride and groom, in order to get a front-row seat for the ritual. And then when the unity candle was lit, she tried to blow it out. Because when you're two years old, the only time you see people make a big deal about lighting a candle is when it's ato...
Why was the RAM drive removed from Windows 95?
Commenter Travis Owens asks, "Why was the RAM drive removed from Windows 95?" As with many of these types of accusatory questions, this comes with a false hidden assumption, in this case, that the RAM drive was in Windows 95 to begin with. Remember that Windows 95 introduced a new driver model, so any RAM drive would have had to be written from scratch. (Well, okay, you could use the old 16-bit RAM drive, but then you'd be going through the real-mode mapper, at which point your performance would go down the tubes.) As you admitted, it was a very niche feature that usually hurts but can sometimes h...
Keeping a visit a surprise after people have already guessed that you’re coming
Last year, a friend of mine who lives out of state—let's call her Lisa—wanted to pay her family in Seattle a surprise visit, and I was enlisted as an accomplice. (Specifically, my rôle was to pick her up from the airport and take her home.) Everything was going smoothly until she made the mistake of telling one of another out-of-state relative about her plans. That relative then told a family member in Seattle, "Don't tell anybody, because it's a secret, but Lisa is making a surprise visit next week." And that family member told two more family members, "Don't tell anybody, because it's a secr...
Destroying the module and resource information associated with an icon
We've seen that icons and cursors know where they came from, and the window manager uses this information when you ask it to change the size of an icon. But not all icons carry this information, only icons created by passing a HINSTANCE and a resource name. You can use this to your advantage if you want to destroy the module and resource information associated with an icon. For example, the CreateIconIndirect function creates an icon from raw bitmap information without reference to an HINSTANCE or a resource name. This allows you to create icons at runtime, but it also allows you to create an icon that "throw...
Oh no, there’s fog in San Francisco!
My flight out of Seattle on Wednesday was delayed for about an hour. The explanation: Fog in San Francisco. Whoa, fog in San Francisco. Must've taken them by surprise!
Why does Explorer generate a page fault every two seconds?
If you fire up Task Manager and look at the page fault count, you'll see that even when nothing is going on, Explorer takes a page fault every two seconds. Isn't this bad? I though you weren't supposed to poll. Here's an interesting experiment: Change your update speed to High. Wow, the page fault rate quadruples to a page fault every half second. At this point, you should start suspecting some sort of Heisenbehavior, that is, that the behavior of the system is changing due to your act of observing it. The page faults are coming from the CPU meter in the notification area. At each update, Task Manager sets ...
When somebody says a game is like chess, it is usually completely unlike chess
Chess has become elevated to the gold standard of board games. Everybody wishes their game had the cultural gravity of chess, a game whose mere mention elevates you to the category of deep thinker and profound strategist. (We'll set aside the scrawny glasses-wearing nerd part for now.) I've learned that when somebody says a game is like chess, it's pretty much guaranteed that the game in fact bears no resemblance to chess whatsoever. I came to this realization when somebody pulled out a game with a strange-looking board with what looked like plastic volcanoes glued to the surface, catwalks, and a lazy susan....
Icons and cursors know where they came from
If you create an icon by calling , the window manager loads the specified icon from the module you specified, but it also remembers where the icon came from. (This discussion also applies, mutatis mutandis to cursors, but I will just talk about icons to avoid awkardness.) When you pass the flag to the function, the window manager goes back to the original icon source to create the copy you requested rather than blindly stretching the pixels of the icon you passed in. Remember that an ICO file represents not just one icon but rather a collection of icons (known as an "icon group"), each at a different size or ...
It’s not Christmas: Nobody enjoys unwrapping your present
I don't know why it happens, but it happens with disturbing frequency. A customer wants to report a problem, and then illustrate it with a screenshot or two, but instead of attaching the screenshots, they paste the screenshots inside a Word document (and for some reason it's always Word) and then attach the Word document. It's not a Christmas present. People aren't going to say "Wow, I wonder what's inside? I'm brimming with anticipation!" They're going to say, "Oh great, I can't even see the screen shot. I have to download the attachment, scan it for viruses, then load it into Word. Oh wait, this is a Word 200...