Showing archive results for 2011

Jan 27, 2011
Post comments count0
Post likes count1

How do you obtain the icon for a shortcut without the shortcut overlay?

Raymond Chen

The easy one-stop-shopping way to get the icon for a file is to use the function with the flag. One quirk of the function is that if you pass the path to a shortcut file, it will always place the shortcut overlay on the icon, regardless of whether you passed the flag. (Exercise: What is so special about the shortcut overlay that makes it exemp...

Code
Jan 26, 2011
Post comments count0
Post likes count1

Microspeak: Leverage

Raymond Chen

At Microsoft, leverage is not a term of physics whereby a force can be magnified by the application of mechanical advantage. It is also not a term of finance whereby the power of a small amount of money can be magnified by the assumption of debt. In fact, at Microsoft, the word leverage isn't even a noun. It is a verb: to leverage, leverages, lever...

Non-ComputerMicrospeak
Jan 25, 2011
Post comments count0
Post likes count1

Why does the name of my TEMP directory keep changing?

Raymond Chen

A customer liaison contacted the shell team with the following request: Subject: Support case: 069314718055994 On two of my customer's machines, he's finding that if he opens %TEMP% from the Start menu, it opens C:\Users\username\AppData\Local\Temp\1, C:\Users\username\AppData\Local\Temp\2, and so on. Each time the user logs off and back on, the ...

Tips/Support
Jan 24, 2011
Post comments count0
Post likes count1

There's a default implementation for WM_SETREDRAW, but you might be able to do better

Raymond Chen

If your window doesn't have a handler for the message, then will give you a default implementation which suppresses messages for your window when redraw is disabled, and re-enables (and triggers a full repaint) when redraw is re-enabled. (This is internally accomplished by making the window pseudo-invisible, but that's an implementation detail...

Code
Jan 21, 2011
Post comments count0
Post likes count0

The 2011/2012 Seattle Symphony subscription season at a glance

Raymond Chen

Every year, I put together a little pocket guide to the Seattle Symphony subscription season for my symphony friends to help them decide which ticket package they want. As before, you might find it helpful, you might not, but either way, you're going to have to suffer through it. Here's the at-a-glance season guide for the first season with ne...

Non-Computer
Jan 21, 2011
Post comments count0
Post likes count1

Modality, part 9: Setting the correct owner for modal UI, practical exam

Raymond Chen

Here's a question that came from a customer. You can answer it yourself based on what you know about modal UI. (If you're kind of rusty on the topic, you can catch up here.) I've left in some irrelevant details just to make things interesting. Our program launches a helper program to display an Aero Wizard to guide the user through submitting ...

Code
Jan 20, 2011
Post comments count0
Post likes count1

How to turn off the exception handler that COM "helpfully" wraps around your server

Raymond Chen

Historically, COM placed a giant around your server's methods. If your server encountered what would normally be an unhandled exception, the giant would catch it and turn it into the error . It then marked the exception as handled, so that the server remained running, thereby "improving robustness by keeping the server running even when it encou...

Code
Jan 18, 2011
Post comments count0
Post likes count1

Don't just stand around saying somebody should do something: Be someone

Raymond Chen

On one of the frivolous mailing lists in the Windows project, somebody spotted some behavior that seemed pretty bad and filed a bug on it. The project was winding down, with fewer and fewer bugs being accepted by the release management team each day, so it was not entirely surprising that this particular bug was also rejected. News of this smackdo...

Non-Computer
Jan 17, 2011
Post comments count0
Post likes count1

Was showing the column header in all Explorer views a rogue feature?

Raymond Chen

User :( asks whether the Explorer feature that shows the column headers in all views was a rogue feature or a planned one. If it was a rogue feature, it was a horribly badly hidden one. One of the important characteristics of the rogue feature is that you not be able to tell that the feature is there unless you go looking for it. If the featu...

Other