Showing results for October 2012 - The Old New Thing

Oct 30, 2012
0
0

The wisdom of seve^H^H^H^Hsixth graders: Living without electronics for a week

Raymond Chen
Raymond Chen

Sixth grade students (ages 11 to 12, roughly) were instructed to imagine that they have no television, computer, or telephone for a week and write an essay (in the form of a letter to their parents) on what they would do with their time and why. The assignment was given under standardized test conditions: 90 minutes with nothing but pencil and pape...

Non-ComputerThe wisdom of seventh graders
Oct 30, 2012
0
0

Keyboard shortcut for resizing all columns in a listview control to fit

Raymond Chen
Raymond Chen

The keyboard shortcut for resizing all columns in a report-mode (also known as Details mode) list view control to fit the current content width is Ctrl+Num+. That's the + key on the numeric keypad. (If you're using Explorer, you can also right-click the column header and choose Size All Columns to Fit.) Note that this command is a verb, not a st...

Tips/Support
Oct 29, 2012
0
0

In the conversion to 64-bit Windows, why were some parameters not upgraded to SIZE_T?

Raymond Chen
Raymond Chen

James wonders why many functions kept for parameter lengths instead of upgrading to or . When updating the interfaces for 64-bit Windows, there were a few guiding principles. Here are two of them. Don't change an interface unless you really need to. Do you really need to? Changing an interface causes all sorts of problems when porting. Fo...

Other
Oct 26, 2012
0
0

Whether the Unicode Bidi algorithm is intuitive depends on your definition of "intuitive"

Raymond Chen
Raymond Chen

In Windows, we spend a good amount of time with the pseudo-mirrored build. And one of the things that you notice is that pseudo-mirrored text comes out looking really weird. For example, the string really? (yup). comes out pseudo-mirrored as .(really? (yup. Just for fun, here's here's how your browser renders it: really? (yup). Even stranger,...

Other
Oct 25, 2012
0
0

Keyboard layouts aren't like Beetlejuice – they won't appear just because you say their name

Raymond Chen
Raymond Chen

A customer reported a bug in Windows Vista Home Editions: We are handling a Ctrl+V keyboard event and want to interpret it in the context of a US-English keyboard. On Windows XP and versions of Windows Vista other than Home editions, the three calls all succeed, whereas on Windows Vista Home Editions, the calls fail. On the other hand, ...

Code
Oct 24, 2012
0
0

You can't use the WM_USER message in a dialog box

Raymond Chen
Raymond Chen

Today, I'm not actually going to say anything new. I'm just going to collate information I've already written under a better title to improve search engine optimization. A customer reported that they did the following but found that it didn't work: "I send the message to my dialog, but the value doesn't stick. At random times, the value rese...

Code
Oct 23, 2012
0
0

Diversion: Generating a random color from JavaScript

Raymond Chen
Raymond Chen

A colleague posed a little puzzle for a fun little app he was writing in HTML: He wanted to generate a random color. If you search around the intertubes, you can find several possible attempts at a solution, like this collection, and an interesting example that has trouble with the pigeonhole principle. The original function to generate a ra...

Code
Oct 22, 2012
0
0

How do you come up with new shortcut keys?

Raymond Chen
Raymond Chen

Anon asks, "How do you come up with new shortcut keys and how do you deal with different keyboard layouts? What is the process; is there a company-wide procedure to keep things consistent?" This is several questions (none of them really a suggestion, but I've given up on making the Suggestion Box about suggestions; now it's just the "Ask Raymond a...

Other