Showing results for August 2008 - Page 2 of 4 - The Old New Thing

Aug 22, 2008
Post comments count0
Post likes count0

Destroying the module and resource information associated with an icon

Raymond Chen
Raymond Chen

We've seen that icons and cursors know where they came from, and the window manager uses this information when you ask it to change the size of an icon. But not all icons carry this information, only icons created by passing a HINSTANCE and a resource name. You can use this to your advantage if you want to destroy the module and resource inform...

Other
Aug 21, 2008
Post comments count0
Post likes count0

Oh no, there’s fog in San Francisco!

Raymond Chen
Raymond Chen

My flight out of Seattle on Wednesday was delayed for about an hour. The explanation: Fog in San Francisco. Whoa, fog in San Francisco. Must've taken them by surprise!

Non-Computer
Aug 21, 2008
Post comments count0
Post likes count0

Why does Explorer generate a page fault every two seconds?

Raymond Chen
Raymond Chen

If you fire up Task Manager and look at the page fault count, you'll see that even when nothing is going on, Explorer takes a page fault every two seconds. Isn't this bad? I though you weren't supposed to poll. Here's an interesting experiment: Change your update speed to High. Wow, the page fault rate quadruples to a page fault every half second...

Other
Aug 20, 2008
Post comments count0
Post likes count0

When somebody says a game is like chess, it is usually completely unlike chess

Raymond Chen
Raymond Chen

Chess has become elevated to the gold standard of board games. Everybody wishes their game had the cultural gravity of chess, a game whose mere mention elevates you to the category of deep thinker and profound strategist. (We'll set aside the scrawny glasses-wearing nerd part for now.) I've learned that when somebody says a game is like chess, it...

Non-Computer
Aug 20, 2008
Post comments count0
Post likes count0

Icons and cursors know where they came from

Raymond Chen
Raymond Chen

If you create an icon by calling , the window manager loads the specified icon from the module you specified, but it also remembers where the icon came from. (This discussion also applies, mutatis mutandis to cursors, but I will just talk about icons to avoid awkardness.) When you pass the flag to the function, the window manager goes back to the...

Other
Aug 19, 2008
Post comments count0
Post likes count0

It’s not Christmas: Nobody enjoys unwrapping your present

Raymond Chen
Raymond Chen

I don't know why it happens, but it happens with disturbing frequency. A customer wants to report a problem, and then illustrate it with a screenshot or two, but instead of attaching the screenshots, they paste the screenshots inside a Word document (and for some reason it's always Word) and then attach the Word document. It's not a Christmas pre...

Otheremail
Aug 18, 2008
Post comments count0
Post likes count0

As a courtesy to performers and other audience members, please turn off blinking head-mounted devices

Raymond Chen
Raymond Chen

When a theater or concert performance begins, there is often an announcement asking audience members to silence their cell phones and similar devices. Some time ago, a light blinked near the ear of a gentleman a few rows in front of me throughout the entire performance. I couldn't tell what it was for sure, but it appeared to be the indicator ligh...

Non-Computer
Aug 18, 2008
Post comments count0
Post likes count0

What happened to the Search option on the right hand side of the Start menu?

Raymond Chen
Raymond Chen

You may have noticed that in Windows Vista Service Pack 1, the Search option on the right hand side of the Start menu has been removed. What happened to it? It's redundant with the Search Box, that thing that has the keyboard focus when you initially open the Start menu. (But if you really want to open Explorer in Search mode, you can still...

Tips/Support
Aug 15, 2008
Post comments count0
Post likes count0

The Seattle Danskin Women’s Triathlon 2008

Raymond Chen
Raymond Chen

This Sunday will be the Nth annual Seattle Danskin Women's Triathlon (for some value of N greater than 1), the largest women-only triathlon. I learned about this event last year when I saw that the express lanes on the I-90 bridge were crowded with bicyclists, and I went online to try to figure out what was going on. As I clicked around, I found...

Non-Computer
Aug 15, 2008
Post comments count0
Post likes count0

The implementation of iterators in C# and its consequences (part 4)

Raymond Chen
Raymond Chen

You can breathe a sigh of relief. Our long national nightmare is over: this is the end of CLR Week 2008. We wind down with a look back at iterators. Michael Entin points out that you can use C# iterators to make asynchronous code easier to write. You can use C# iterators for more than simply iterating. The automatic conversion of...

Code