The Old New Thing

Pitfalls of transparent rendering of anti-aliased fonts

Windows provides a variety of technologies for rendering monochrome text on color displays, taking advantage of display characteristics to provide smoother results. These include grayscale anti-aliasing as well as the more advanced ClearType technique. Both of these methods read from the background pixels to decide what pixels to draw in the...
Comments are closed.0 0
Code

Lies and statistics: 600,000 Chinese engineers

Everybody "knows" that China produced 600,000 engineers in 2004 (as compared to 70,000 in the United States), but Carl Bialik at the Wall Street Journal [corrected 9:30am] smelled something funny, so he chased the source of the numbers to see whether this "fact" was indeed true. It wasn't. NPR interviewed a Duke professor whose class ...

Fumbling around in the dark and stumbling across the wrong solution

I don't mean to pick on this series of entries, but it illustrates an interesting pattern of stumbling across the wrong "solution". The series begins by attempting to trigger the system's monitor blank timeout by posting a message to the desktop window. As we saw earlier, the desktop window is a very special window and as a rule should be...

Remember what happens when you broadcast a message

Occasionally I catch people doing things like broadcasting a WM_COMMAND message to all top-level windows. This is one of those things that is so obviously wrong I don't see how people even thought to try it in the first place. Suppose you broadcast the message What happens? Every top-level window receives the message with the same ...
Comments are closed.0 0
Code

What happened to the traffic circle at the corner of 156th Ave NE and NE 56th Way?

Windows Live Local and Google Maps both show a traffic circle at the corner of 156th Ave NE and NE 56th Way, but if you pay the intersection a visit in person, you won't find one. It was replaced with a speed bump in 2005. Why? I stumbled across the explanation completely by happenstance. There was a small article in the local newspaper ...

Why did the Add or Remove Programs control panel try to guess all that information?

As we saw earlier, the "Add or Remove Programs" control panel used several heuristics to attempt to determine things like program size and frequency of user. Why did it bother doing this at all? At the time the feature was added, disk space was not cheap like it is today. One of the problems users were having was running out of disk space ...

The forgotten common controls: The MenuHelp function

The MenuHelp function is one of the more confusing ones in the common controls library. Fortunately, you will almost certainly never had need to use it, and once you learn the history of the MenuHelp function, you won't want to use it anyway. Our story begins with 16-bit Windows. The WM_MENUSELECT message is sent to notify a window of ...
Comments are closed.0 0
Code

Disaster averted, thanks to undisclosed government action, no really

On his web site, http://www.savelivesinmay.com, Eric Julien predicted that (and I hope I got this right) on May 25, 2006, comet fragments generated in 1995 by a hostile extraterrestrial civilization would impact the Atlantic Ocean near the Azores, followed by volcanic eruptions which would create a giant tsunami that would wipe out the ...

If you're going to try to simulate user actions, make sure the user can do them

Many people like to simulate user actions programmatically. I'm not going to comment here on whether that's a good idea to begin with; what I want to point out is that if you're going to do it, you have to make sure you're simulating things the user can actually do. For example, if you want to act as if the user clicked the "close" button in...
Comments are closed.0 0
Code

Apparently driving is messed up in a lot of countries

From the reactions to my entry on driving in Taiwan, it appears that driving is pretty messed up all over Asia. Here's a video of driving in India that was popular a while back. This comment comparing Taiwan driving to the Philippines reminded me of a conversation I had with some Filipino tourists when I was in Taiwan. We were on a bus as ...