The Old New Thing

Kinder Überraschungen
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
Writing a sort comparison function
When you are writing a sort comparison function (say, to be passed to ListView_SortItems or *gasp* to be used as an IComparer), your comparison function needs to follow these rules: Reflexivity: Compare(a, a) = 0. Anti-Symmetry: Compare(a, b) has the opposite sign of Compare(b, a), where 0 is considered to be its own opposite. Transitivity...
Comments are closed.0Code
Using the TAB key to navigate in non-dialogs
Using the TAB key to navigate in non-dialogs
The IsDialogMessage function works even if you aren't a dialog. As long as your child windows have the WS_TABSTOP and/or WS_GROUP styles, they can be navigated as if they were part of a dialog box. One caveat is that IsDialogMessage will send DM_GETDEFID and DM_SETDEFID messages to your window, which are ...
Comments are closed.0Code
What is the Alt+Tab order?
What is the Alt+Tab order?
What determines the order in which icons appear in the Alt+Tab list? The icons appear in the same order as the window Z-order. When you switch to a window, then it comes to the top of the Z-order. If you minimize a window, it goes to the bottom of the Z-order. The Alt+Esc hotkey (gosh, does ...
The more I learn about Sweden, the weirder it gets
The more I learn about Sweden, the weirder it gets
It must be really boring in Sweden in the winter. Things to do: Military service in Sweden is compulsory for all males. When your country has not participated in any wars for two hundred years, you have to pass the time somehow. Apparently one of the ...
Curling anyone?
Curling anyone?
The Granite Curling Club is having their annual open house today, October 18th 2003, from 2pm to 8pm. The Seattle facility is the only dedicated curling facility in the United States west of the Rockies. Bring sweatpants, flat-soled shoes, and $5. They'll provide the brooms and duct tape. I became fascinated with curling many ...
Don't let Marketing mess with your slides
Don't let Marketing mess with your slides
It's PDC season, so I thought I'd relate an anecdote about a conference from many years ago. I forget which conference it was, maybe GCDC 1996, we were all busy preparing our presentations and submitted them to the Microsoft conference representatives so they could apply the standard ...
Scrollbars redux: Part 12
Scrollbars redux: Part 12
Reader Jeff Miller added Word-style scroll tips to our sample scrollbar program. Here's how he did it: A tracking tooltip is used to display the scroll tip because we don't want the tooltip to do automatic positioning or automatic show/hide. When a tracking scroll occurs (...
Comments are closed.0Code