The Old New Thing

If the Euro 2004 tournament were a video game

If the Euro 2004 tournament were a video game, it might have looked like this. View recreations of the tournament highlights, and since the graphics are computer-generated, you can select among multiple camera angles, embody a specific player, or see what it's like to be the ball itself! (Via MetaFilter.) [Raymond is currently on ...

Let WMI do the heavy lifting of determining system information

Windows Management Instrumentation is a scriptable interface to configuration information. This saves you the trouble of having to figure it out yourself. For example, here's a little program that enumerates all the CPUs in your system and prints some basic information about them. var locator = WScript.CreateObject("WbemScripting....

How does Explorer detect whether your program supports long file names?

When you register your program with a file association, the shell needs to decide whether your program supports long file names so it can decide whether to pass you the long name (which may contains spaces! so make sure you put quotation marks around the "%1" in your registration) or the short name. The rule is simple: The shell looks at ...

The compatibility constraints of even your internal bookkeeping

The Listview control when placed in report mode has a child header control which it uses to display column header titles. This header control is the property of the listview, but the listview is kind enough to let you retrieve the handle to that header control. And some programs abuse that kindness. It so happens that the original ...

Implementing higher-order clicks

Another question people ask is "How do I do triple-click or higher?" Once you see the algorithm for double-clicks, extending it to higher order clicks should be fairly natural. The first thing you probably should do is to remove the CS_DBLCLKS style from your class because you want to do multiple-click management manually. Next, you can ...

The procedure entry point SHCreateThreadRef could not be located…

Some people smarter than me have been working on this problem, and here's what they figured out. First, I'll just reprint their analysis (so that people with the problem and are searching for the solution can find it), and then we can discuss it. Update (18 October 2005): The official version of this document is now available. Please use ...

Dispatching items collected from the suggestion box

Okay, I got around to digging through the suggestion box, and today I'm going to dispatch the items that don't require much thought but seemed worthy of reply to some degree. You won't learn much of anything today. Other entries require more thought. Each non-code entry takes me a half hour or so, more if I have to do research (if ...