The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

May 24, 2011
Post comments count 0
Post likes count 1

Microspeak: PowerPoint Karaoke and the eye chart

Raymond Chen

The game PowerPoint-Karaoke was invented in 2006 by Zentrale Ingelligenz Agentur. In this game, contestants are called upon to give a PowerPoint presentation based on a slide deck they have never seen. (The German spelling uses a hyphen between the two words. When "translated" into English, the hyphen is often omitted.) At Microsoft, the term has been extended to refer to giving a presentation from slides prepared by somebody else, usually on short notice and therefore with little preparation. Bob is out sick today, so I'll be giving the overview. Sorry for the PowerPoint Karaoke. This is shorthand for "Sorr...

May 23, 2011
Post comments count 0
Post likes count 1

If it's possible to do something, then it's possible to do something WRONG

Raymond Chen

Once you make it possible to do something, you have to accept that you also made it possible to do something wrong. When the window manager was originally designed, it made it possible for programs to override many standard behaviors. They could handle the message so a window can be dragged by grabbing any part of the window, not just the caption bar. They could handle the message to draw custom title bars. The theory was that making all of these things possible permitted smart people to do clever things. The downside is that it also permits stupid people to do dumb things. Changing the window procedur...

May 20, 2011
Post comments count 0
Post likes count 1

One engineer's interpretation of the Segway as a hybrid vehicle

Raymond Chen

In a discussion of commuting options (in which I was primarily an observer), the following exchange took place: A: I would rather get kicked in the shins every morning than bike up the massive hill that sits between my apartment and main campus. B: Have you tried an electric bike? C: If you're going to eliminate pedaling, then you may as well go all the way and get a Segway. B: Actually, I used to own a Segway. I was floored by the engineering achievement of creating a device that combined the speed benefits of walking with the exercise benefits of driving, and for just the cost of a used Honda! Note, of co...

May 20, 2011
Post comments count 0
Post likes count 1

BeginBufferedPaint: It's not just for buffered painting any more

Raymond Chen

I covered the function in my 2008 PDC presentation, but one thing I didn't mention is that the buffered paint functions are very handy even if you have no intention of painting. Since the buffered paint functions maintain a cache (provided that you remembed to call ), you can use to get a temporary bitmap even if you have no intention of actually painting to the screen. You might want a bitmap to do some off-screen composition, or for some other temporary purpose, in which case you can ask to give you a bitmap, use the bitmap for whatever you like, and then pass when you call to say "Ha ha, just kidding....

May 19, 2011
Post comments count 0
Post likes count 2

Why is my program terminating with exit code 3?

Raymond Chen

Looks like that's what the Microsoft C runtime uses for an abort.

May 18, 2011
Post comments count 0
Post likes count 1

Watching the battle between Facebook and Facebook spammers

Raymond Chen

I am watching the continuing battle between Facebook and Facebook spammers with detached amusement. When I see a spam link posted to a friend's Facebook wall, I like to go and figure out how they got fooled. Internet Explorer's InPrivate Browsing comes in handy here, because I can switch to InPrivate mode before visiting the site, so that the site can't actually cause any harm to my Facebook account since I'm not logged in and it doesn't know how to log me in. The early versions were simply Web pages that hosted an embedded YouTube video, but they placed an invisible "Like" button over the playback controls, so ...

May 18, 2011
Post comments count 0
Post likes count 1

How long do taskbar notification balloons appear on the screen?

Raymond Chen

We saw some time ago that taskbar notification balloons don't penalize you for being away from the computer. But how long does the balloon stay up when the user is there? Originally, the balloon appeared for whatever amount of time the application specified in the member of the structure, subject to a system-imposed minimum of 10 seconds and maximum of 60 seconds. In Windows XP, some animation was added to the balloon, adding 2 seconds of fade-in and fade-out animation to the display time. Starting in Windows Vista, applications are no longer allowed to specify how long they wanted the balloon to appear...

May 17, 2011
Post comments count 0
Post likes count 1

Why does Explorer show a thumbnail for my image that's different from the image?

Raymond Chen

A customer (via a customer liaison) reported that Explorer somestimes showed a thumbnail for an image file that didn't exactly match the image itself. I have an image that consists of a collage of other images. When I switch Explorer to Extra Large Icons mode, the thumbnail is a miniature representation of the image file. But in Large Icons and Medium Icons mode, the thumbnail image shows only one of the images in the collage. I've tried deleting the thumbnail cache, but that didn't help; Explorer still shows the wrong thumbnails for the smaller icon modes. What is wrong? The customer provided screenshots dem...

May 16, 2011
Post comments count 0
Post likes count 1

Multithreaded UI code may be just as hard as multithreaded non-UI code, but the consequences are different

Raymond Chen

Commenter Tim Smith claims that the problems with multithreaded UI code are not significantly more than plain multithreaded code. While that may be true on a theoretical level, the situations are quite different in practice. Regardless of whether your multithreaded code does UI or not, you have to deal with race conditions, synchronization, cache coherency, priority inversion, all that mulitthreaded stuff. The difference is that multithreaded problems with non-UI code are often rare, relying on race conditions and other timing issues. As a result, you can often get away with a multithreaded bug, because it may...