The Old New Thing

An anecdote about improper capitalization

I've already discussed some of the strange consequences of case-sensitive comparisons. Joe Beda mentioned the Internet Explorer capitalization bug that transformed somebody's name into a dead body. Allow me to elaborate. You might learn something. This bug occurred ...

Just follow the rules and nobody gets hurt

You may have been lazy and not bothered calling VirtualProtect(PAGE_EXECUTE) when you generated some code on the fly. You got away with it because the i386 processor page protections do not have a "read but don't execute" mode, so anything you could read you could also execute. Until...
Comments are closed.0 0
Code

The long and sad story of the Shell Folders key

When you are attempting to architect an operating system, backwards compatibility is one of the ones you just have to accept. But when new programs rely on app hacks designed for old programs, that makes you want to scream. Once upon a time, in what seems like a galaxy far far away (a Windows 95 beta release known as "M3"), we documented a...

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...
Comments are closed.0 0
Code

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 WndProc...
Comments are closed.0 0
Code

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. // Add to WndProc case WM_CONTEXTMENU...
Comments are closed.0 0
Code

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. Small parts. But that can be fixed by labelling the egg as "for ages 3 and up...