The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

Jun 1, 2011
Post comments count 0
Post likes count 1

How do I prevent users from pinning my program to the taskbar?

Raymond Chen

A customer wanted to prevent users from pinning their application to the taskbar. I have an application that is launched as a helper by a main application. Users shouldn't be launching it directly, but rather should be launching the main application. But since the helper shows up in the taskbar, users may be tempted to right-click on the taskbar icon and select "Pin to taskbar." Unfortunately, this pins the helper program to the taskbar instead of the main application, and launching the helper program directly doesn't work. Is there a way I can prevent users from pinning the helper program? It so happens tha...

May 31, 2011
Post comments count 0
Post likes count 1

My evil essence revealed

Raymond Chen

I found it amusing that somebody considered the fact that Microsoft employees can read my queued-up blog entries before the articles are published to be further evidence of Microsoft's evil essence as a monopoly. Just for the record, this is not evidence of Microsoft's evil essence as a monopoly. Rather, it's evidence of Raymond's evil essence as a monopoly, because the monopoly on blog articles written by Raymond Chen that haven't yet been published belongs to me.

May 30, 2011
Post comments count 0
Post likes count 1

Just for fun: Sample user names in Windows 7

Raymond Chen

Names from around the world.

May 27, 2011
Post comments count 0
Post likes count 1

Why are custom properties created on Windows 2000 lost when I view the file from newer versions of Windows?

Raymond Chen

In Windows 2000, Explorer let you add properties like Summary and Author to nearly any file type. But when you view the files from a machine running Windows XP or later, those properties are lost. Where did they go? Most file types do not have extensibility points for adding metadata. For example, every byte of a plain text files is devoted to text data; there is nowhere to put metadata like Author or Summary. In Windows 2000, the shell chose to store this extra information in NTFS alternate data streams (or more accurately, the shell chose to use the storage format, which is implemented in term...

May 26, 2011
Post comments count 0
Post likes count 1

How do IsThemeActive, IsAppThemed, and IsCompositionActive differ?

Raymond Chen

There are three functions which test very similar things, and sometimes applications pick the wrong one. Here's the rundown: Note that these functions do not answer the question "Is the application using the visual-styles-enabled version of the common controls library?" That question is harder to answer because the decision to use the visual-styles-enabled version of the common controls library is not a process-wide one but is rather made on a window-by-window basis. You can have an application where half of the button controls are the old non-visual-styles version and half of the button controls participate i...

May 25, 2011
Post comments count 0
Post likes count 2

WinMain is just the conventional name for the Win32 process entry point

Raymond Chen

is the conventional name for the user-provided entry point in a Win32 program. Just like in 16-bit Windows, where the complicated entry point requirements were converted by language-provided startup code into a call to the the user's function, the language startup code for 32-bit programs also does the work of converting the raw entry point into something that calls (or or ). The raw entry point for 32-bit Windows applications has a much simpler interface than the crazy 16-bit entry point: The operating system calls the function with no parameters, and the return value (if the function ever returns) i...

May 24, 2011
Post comments count 0
Post likes count 1

Microspeak: PowerPoint Karaoke and the eye chart

Raymond Chen

The game PowerPoint-Karaoke was invented in 2006 by Zentrale Ingelligenz Agentur. In this game, contestants are called upon to give a PowerPoint presentation based on a slide deck they have never seen. (The German spelling uses a hyphen between the two words. When "translated" into English, the hyphen is often omitted.) At Microsoft, the term has been extended to refer to giving a presentation from slides prepared by somebody else, usually on short notice and therefore with little preparation. Bob is out sick today, so I'll be giving the overview. Sorry for the PowerPoint Karaoke. This is shorthand for "Sorr...

May 23, 2011
Post comments count 0
Post likes count 1

If it's possible to do something, then it's possible to do something WRONG

Raymond Chen

Once you make it possible to do something, you have to accept that you also made it possible to do something wrong. When the window manager was originally designed, it made it possible for programs to override many standard behaviors. They could handle the message so a window can be dragged by grabbing any part of the window, not just the caption bar. They could handle the message to draw custom title bars. The theory was that making all of these things possible permitted smart people to do clever things. The downside is that it also permits stupid people to do dumb things. Changing the window procedur...

May 20, 2011
Post comments count 0
Post likes count 1

One engineer's interpretation of the Segway as a hybrid vehicle

Raymond Chen

In a discussion of commuting options (in which I was primarily an observer), the following exchange took place: A: I would rather get kicked in the shins every morning than bike up the massive hill that sits between my apartment and main campus. B: Have you tried an electric bike? C: If you're going to eliminate pedaling, then you may as well go all the way and get a Segway. B: Actually, I used to own a Segway. I was floored by the engineering achievement of creating a device that combined the speed benefits of walking with the exercise benefits of driving, and for just the cost of a used Honda! Note, of co...