Posts by this author

Oct 28, 2004
0
1

Where did windows minimize to before the taskbar was invented?

Before Explorer was introduced in Windows 95, the Windows desktop was a very different place. The icons on your desktop did not represent files; rather, when you minimized a program, it turned into an icon on the desktop. To open a minimized program, you had to hunt for its icon, possibly minimizing other programs to get them out of the way...

History
Oct 27, 2004
0
0

Sometimes you can’t read the text under the cursor

I had previously written on how you can retrieve the text under the cursor, and you may have noticed that it produces mixed results. It works great with some programs but not with others. It depends on the program in question. Some programs were written with greater attention to supporting screen readers than others. Internet Explorer, for examp...

Other
Oct 26, 2004
0
1

The strangest way of detecting Windows NT

A colleague of mine nominated this code for Function of the Year. (This is the same person who was the first to report that a Windows beta used a suspect URL.) I have to admit that this code is pretty impressive. Of all the ways to check the operating system, you have to agree that sniffing at an undocumented implementation detail of memory-mapp...

Other
Oct 25, 2004
0
1

Accessing the current module’s HINSTANCE from a static library

If you're writing a static library, you may have need to access the HINSTANCE of the module that you have been linked into. You could require that the module that links you in pass the HINSTANCE to a special initialization function, but odds are that people will forget to do this. If you are using a Microsoft linker, you can take advantage of a ...

Code
Oct 25, 2004
0
0

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 vacation; th...

Non-Computer
Oct 22, 2004
0
0

Why doesn’t Setup asks you if you want to keep newer versions of OS files?

Windows 95 Setup would notice that a file it was installing was older than the file already on the machine and would ask you whether you wanted to keep the existing (newer) file or to overwrite it with the older version. Asking the user this question at all turned out to have been a bad idea. It's one of those dialogs that ask the user a qu...

History
Oct 21, 2004
0
0

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.SWbemLocator...

Code
Oct 20, 2004
0
0

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 your pr...

History
Oct 19, 2004
0
0

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 listview...

History
Oct 18, 2004
0
0

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 simply...

Code