The Old New Thing

Why highlighting by inverting colors is a bad idea

Often people will say, "Oh, we can highlight by inverting the color." This may have worked great on two-color black-and-white displays, but in the world of 32-bit color this no longer is effective. Consider the following picture. See if you can guess which one is inverted...

I thought you said people don't know how to read analog clocks

I had mentioned in passing in a comment on 10/10/2003 10:07PM that one of the reasons the clock on the taskbar isn't analog is that some disturbingly high percentage of people (30%? 40%? I forget exactly) do not know how to read an analog clock. Yet there is is in the Longhorn sidebar. ...

Drawing an active-looking caption even when not active

"Why would somebody ever want to do that?" you might ask. Well, this is a common appearance for floating toolbars. (But aside from that case, I can't think of any other valid reason to draw a window as active even though it isn't.) Fortunately this is easy to do. Just add this line to the of...

When vendors insult themselves

During Windows 95, when we were building the Plug and Play infrastructure, we got an angry letter from a hardware vendor (who shall remain nameless) complaining that we intentionally misspelled their company name in our INF files in a manner that made their company name similar to an insulting word...

Getting a custom right-click menu for the caption icon

Explorer does it. Now you can too. It's a simple matter of detecting a context menu on the caption icon and displaying a custom context menu. Here are the simple changes to our scratch program to display a rather pointless one-item menu. When we receive a message, we check...

Being the Nobel Peace Prize

For Hallowe'en this year, I'm going to be the Nobel Peace Prize. (I like being things that people would never even think of as a possible Hallowe'en costume. Last year, I was an inter-office envelope. People addressed me from place to place.) I chose the Nobel Peace Prize in part because...

Kinder Überraschungen

Laura John entertains her colleagues with Kinder Surprise eggs. I love these things. I understand that Kinder Surprise eggs are illegal in the US for two reasons. Whenever I go to Germany I smuggle some Kinder Überraschungen into the States. (Yes...

Writing a sort comparison function

When you are writing a sort comparison function (say, to be passed to or *gasp* to be used as an ), your comparison function needs to follow these rules: Reflexivity: . Anti-Symmetry: has the opposite sign of , where 0 is considered to be its own opposite. Transitivity: If and , then . Here are some logical consequences of these rules...