The Old New Thing
Practical development throughout the evolution of Windows.
Latest posts

Exercise doesn't have any effect unless you know you're doing it

Hotel maids began losing weight once they were informed that their normal job activities counted as exercise. I can't want for somebody to test whether this placebo effect works in reverse; that is, whether you will lose weight if you aren't actually exercising but believe that you are. If it works, then sign me up! (Oh rats, they addressed this in the interview.)

What a drag: Dragging text

It's just a string.

Why isn't there a GetDlgItemFloat function?

Jonathan Wilson asks, "Do you know why there is a GetDlgItemInt and a SetDlgItemInt but not a GetDlgItemFloat and a SetDlgItemFloat?" Give people five dollars and they'll ask why you didn't give them ten. Let's start with the first question. Why is there a function? After all, doesn't do anything you couldn't already do with and . Well, reading integers out of dialog boxes is a rather common operation, something that the built-in Windows components do quite a lot of, so making this two-part helper function available more generally available seemed like a reasonable thing to do in the cause of reducing code...

The art of losing things: Keep moving them around

The worst thing about losing things is that when you eventually find them, they're always where you left them. (This assumes you live alone or otherwise can control who touches your stuff.) I have a mental place for most things, and I keep them there, which is great, because when I need, say, my passport, I know where to go. Except that I undermine my own organizational system. For example, the passport will be in the passport drawer for months, and then a trip is coming up, so I go to the passport drawer and confirm, yup it's still there. And then here's where I undermine myself: I take the passport out of the ...

Why can't I convert a time zone abbreviation into a time zone?

Suppose you have a string of the form . How can you parse this into something your program can manipulate, like say a or a ? Basically, you can't in the general case. The time zone abbreviation CST is ambiguous. It could mean U.S./Canada Central Standard Time, Australian Central Standard Time, China Standard Time, or Cuba Summer Time. There may be other possibilities as well. Without any other context, the time zone abbreviation CST could mean any of those time zones. (This doesn't stop people from asking for the feature anyway. Maybe they want fuzzy logic or psychic powers.) Note also that there is an inte...

How do I log on using a dial-up connection on Windows Vista?

Mike Stephens from the Group Policy Team Blog explains how to get "Log on using dial-up connections" working on Windows Vista. But I'm posting to respond to a comment on that page, since that falls under the category of "When people ask for security holes as features." The only problem is all users need to have access to an account with local admin privileges [in order to set this up]. The implied request is that non-administrative users be allowed to create dial-up connections that can be used for logging on. This request falls into the category of When people ask for security holes as features; in this c...

Not my finest hour: Using the wrong mouse

I used the wrong mouse for nearly an entire day. There are a good number of computers in my office, but they all funnel through to two sets of mice, keyboards, and monitors. One set is connected to the machine I use for day-to-day activities; the other set is connected through a switch box to a collection of machines which I used for testing and a variety of other secondary purposes. The switch box that controls the second set of mouse, keyboard and monitor makes no attempt to be smart, and if I move the mouse while it is connected to a computer that is broken into the kernel debugger, the switch box will often...

I hadn't realized it's an entire genre: Music made from Windows system sounds

One. Two. Three. Pre-emptive snarky comment: "That's about all Microsoft is good for: making a song out of their critical stop and error tones."

Email tip: A peer-to-peer discussion group does not come with a service level agreement

Most email discussion groups are not official support channels. There are a lot of peer-to-peer mailing lists inside Microsoft, consisting of people who are interested in a particular topic, sharing tips, providing advice, helping each other out if somebody runs into a problem, but they aren't the official support mechanism for the product group. Here's an example based on actual events. Consider a hypothetical mailing list called Excel Users. Somebody asked a question seeking advice on how to set up a worksheet with specific characteristics and features. A second message was posted: We are still waiting for yo...