The Old New Thing

Hey, who flattened the hills?

This weekend, I went to a friend's house on Mercer Island to see the US Navy Blue Angels flight demonstration team perform. They do this every summer as part of Seattle's Seafair festival, but this was the first time I got to see the show up close and personal. The I-90 bridge is closed for safety reasons, and people are allowed to walk ...

The dangers of playing focus games when handling a WM_KILLFOCUS message

I had noted last year that WM_KILLFOCUS is the wrong time to do field validation. Here's another example of how messing with the focus during a WM_KILLFOCUS message can create confusion. Consider an edit control that displays feedback via a balloon tip. For example, password edit controls often warn you if you're typing your password while...

Have you made any assignments in this space?

Riffing on Larry's profound distaste for the use of the word 'ask' as a noun (a distaste I share)... It's been three years since I heard the question "Have you made any assignments in this space?" during a meeting and I still don't know what the person was trying to say...

Why does the Internet Explorer animated logo arrange its frame vertically?

If you ever tried to build a custom animated logo for Internet Explorer, you cetainly noticed that the frames of the animation are arranged vertically rather than horizontally. Why is that? Because it's much more efficient. Recall that bitmaps are stored as a series of rows of pixels. In other words, if you number the pixels of a bitmap ...

On speaking a particular language in the presence of non-speakers

Having grown up in a household where I didn't speak most of the languages my parents and their friends use, I'm quite accustomed to being surrounded by conversations in a language I have no chance of understanding. If people are more comfortable speaking in a particular language, I say let them. Some people object to this on the grounds that...

Double-clicking radio buttons

A subtlety that adds a level of polish to your dialogs is supporting double-clicked radio buttons as an abbreviation for "select + OK". (Or "select + Next" or "select + Finish" if the page is part of a wizard.) Consider the following dialog template and associated dialog procedure: 1 DIALOGEX DISCARDABLE 32, 32, 200, 76 STYLE ...

Watch out, there are Swedes in the hallway!

Whenever I go to IKEA Seattle, I try to speak Swedish with the people who work there, but it never works. Yesterday, I was heading to a colleague's office to drop off Symphony tickets. (A group of friends wanted tickets together, so the order was placed in my name, and I needed to distribute them to the people in the group.) As I neared ...

Drawing a monochrome bitmap with transparency

Last time, I left you with a brief puzzle. Here are two approaches. I am not a GDI expert, so there may be even better solutions out there. To emphasize the transparency, I'll change the window background color to the application workspace color. BOOL WinRegisterClass(WNDCLASS *pwc) { pwc->hbrBackground = (HBRUSH)(COLOR_APPWORKSPACE...

Rendering menu glyphs is slightly trickier

Last time, we saw how to draw themed and unthemed radio buttons, and I mentioned that menu glyphs are trickier. They're trickier because they are provided as raw monochrome bitmaps instead of fully-formed color-coordinated bitmaps. First, let's do it wrong in order to see what we get. Then we'll try to fix it. Start with a clean new scratch...

Microsoft Company Picnic 2005

This weekend, it was Microsoft's turn to rent Mountain Meadows Farm for the company picnic. As I noted last year, the picnic is put on by a company that just puts on company picnics all summer. In addition to Microsoft, they also do Alaska Air, Honeywell, T-Mobile, and Amazon. I decided to bicycle to the picnic this year. The route was ...