The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

Oct 12, 2006
Post comments count 0
Post likes count 1

How do I prevent multi-line edit controls from eating the Enter key?

Raymond Chen

You might decide to put a multi-line edit control in a dialog box, not because you want the user to input multi-line data, but because it's a convenient way to display multi-line text. When you do that, you may notice that the Enter key does not invoke the default dialog button, as you might normally expect. That's because the multi-line edit control tells the dialog manager that it wants the Enter key. So how do you tell the multi-line edit control to stop doing that and let the Enter key do its normal thing? You already know the answer to this. As we saw quite some time ago, a control responds to the message...

Oct 11, 2006
Post comments count 0
Post likes count 0

Proto-Microspeak: The goat rodeo

Raymond Chen

Somebody at a meeting two years ago used the term "goat rodeo" to describe a completely confused situation. The term stuck with me as a really funny folksy analogy. It's not official Microspeak, but who knows, it may someday gain currency. I certainly enjoy saying it. "Goat rodeo." "Goat rodeo." "Goat rodeo." (Some earlier Microspeak entries: schedule chicken, baking.)

Oct 10, 2006
Post comments count 0
Post likes count 1

When something is available for the user, which user are we talking about?

Raymond Chen

Some people have taken issue with the term for the name of the base of the message range that is the province of the window class implementor. (Refresher for those who forget which messages belong to whom.) The complaint is that the user can't use them since they belong to the window class. Aha, but the real question is, "Who is the user?" In other words, when we say "user-defined", who is the user that's doing the defining? There are four components involved here, and each one gets its own message range. Who is the user? It depends on your point of view. From the window manager's point of view, the class i...

Oct 9, 2006
Post comments count 0
Post likes count 0

How Raymond learns languages (and why it's not working)

Raymond Chen

Whenever I wander into the subject of languages here, a commenter will ask me what my language-acquisition technique is. I have refrained from describing it since it is very peculiar to my way of learning, and I doubt it will work for most people. But since people seem to be interested, here it is. I like to learn a language by learning its rules first, then converting the rules to instinct while picking up vocabulary. This is backwards from how children learn a language, which is entirely instinctual and heavy on vocabulary acquisition with the rules coming only much later when they reach school and need to fin...

Oct 6, 2006
Post comments count 0
Post likes count 0

A very brief return to part 6 of Loading the Chinese/English dictionary

Raymond Chen

Back in Part 6 of the first phase of the "Chinese/English dictionary" series (a series which I intend to get back to someday but somehow that day never arrives), I left an exercise related to the member of the union. Alignment is one of those issues that people who grew up with a forgiving processor architecture tend to ignore. In this case, the member ensures that the total size of the union is suitably chosen so that a can appear immediately after it. Since we're going to put characters immediately after the , we'd better make sure those characters are aligned. If not, then processors that are alignme...

Oct 5, 2006
Post comments count 0
Post likes count 1

Why does Windows hide keyboard accelerators and focus rectangles by default?

Raymond Chen

The release of Windows 2000 introduced a new setting: "Hide underlined letters for keyboard navigation until I press the Alt key," which defaults on for most Western languages. What's the story behind this setting? I still have the rationale from the user interface designer who introduced this feature. Here's a redacted copy: To support our goal of greater simplicity, we plan to suppress keyboard navigation indicators by default. Don't be frightened... The idea is to reduce visual noise in Windows, namely focus indicators and access key underlines in menus and windows. Aesthetically, these things are ...

Oct 4, 2006
Post comments count 0
Post likes count 0

You can invent new adjectives too

Raymond Chen

It's not just verbs and nouns. I just saw the adjective "planful" in a piece of email. I don't know what that is supposed to mean. Neither do dictionary.com or Encarta.

Oct 3, 2006
Post comments count 0
Post likes count 0

If only he'd known to offer to back up their PC instead

Raymond Chen

I love it when two unrelated stories conspire to create amusement beyond what each one provided separately. We start with this report from BoingBoing of a man on Craigslist who offered to perform computer maintenance and repair in exchange for second base. (For those not familar with North American high school sexual slang—and that includes me—I refer you to this schedule of bases on Wikipedia, accompanied by a disturbingly elaborate list of secondary metaphors.) That story provided momentary amusement, but it was subsequently recalled by this unrelated story of a man who was ruled to have been overch...

Oct 3, 2006
Post comments count 0
Post likes count 0

There's a reason why envelopes have backs

Raymond Chen

For some reason, people are upset that I don't have hard data for the cost difference between "slow" and "fast" mode enumeration. I already did a back-of-the-envelope calculation that showed that fast mode reduces the total time to enumerate the items in a folder from five minutes to two seconds. That's what's so great about back-of-the-envelope calculations: They let you make decisions without actually having to implement every possible solution. Some quick estimation shows that using slow mode enumeration would be 200 times slower than fast mode. Does it really matter whether the speed-up is 195.1231 times or e...