Showing results for January 2011 - The Old New Thing

Jan 31, 2011
0
0

Solutions that require a time machine: Making applications which require compatibility behaviors crash so the developers will fix their bug before they ship

Raymond Chen
Raymond Chen

A while ago, I mentioned that there are many applications that rely on messages being delivered even if there is nothing to paint because they put business logic inside their handler. As a result, Windows sends them dummy messages. Jerry Pisk opines, Thanks to the Windows team going out of their way not to break poorly written applications d...

Other
Jan 27, 2011
0
0

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

Raymond Chen
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
0
0

Microspeak: Leverage

Raymond Chen
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
0
0

Why does the name of my TEMP directory keep changing?

Raymond Chen
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
0
0

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

Raymond Chen
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
0
0

The 2011/2012 Seattle Symphony subscription season at a glance

Raymond Chen
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
0
0

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

Raymond Chen
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
0
0

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

Raymond Chen
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 19, 2011
0
0

Why didn't they use the Space Shuttle to rescue the Apollo 13 astronauts?

Raymond Chen
Raymond Chen

Many decisions make sense only in the context of history. Much like the moviegoers who were puzzled why NASA didn't just use the Space Shuttle to rescue the Apollo 13 astronauts, computer users of today, when looking back on historical decisions, often make assumptions based on technology that didn't exist. Consider, for example, pointing out th...

History