The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

My niece asked me what color seashell I would like her to draw
Jun 11, 2010
Post comments count 0
Post likes count 0

My niece asked me what color seashell I would like her to draw

Raymond Chen
Raymond Chen

My niece was amusing herself by drawing pictures with crayon, and she asked me, "I'm going to draw a seashell for you. What color do you want?" I said, "Blue." She responded, "No."

How do I indicate that I want my window to follow right-to-left layout rules?
Jun 11, 2010
Post comments count 0
Post likes count 0

How do I indicate that I want my window to follow right-to-left layout rules?

Raymond Chen
Raymond Chen

There are many ways, depending on how wide a scope you want. If there is one specific window that you want to follow right-to-left layout rules, then you pass the extended window style when you create the window. This extended style is inherited by child windows, so once you set a top-level window to have right-to-left layout, all child windows will have it, too. To block the extended style from being inherited by child windows, pass the style when you create the parent window. Sidebar: If you're calling the function, then you don't directly control the styles of the top-level window. But there's a weird ba...

When you set a 100% CPU program to real-time priority, you get what you asked for
Jun 10, 2010
Post comments count 0
Post likes count 0

When you set a 100% CPU program to real-time priority, you get what you asked for

Raymond Chen
Raymond Chen

Real-time priority is really dangerous. It's higher priority than nearly everything else. It's higher priority than mouse input, keyboard input, and the disk cache. If you foolishly set the priority class of a CPU-intensive program to real-time, it will suck up your entire processor, leaving no cycles for anything else. In particular, since not even input runs at real-time priority, you can't stop it via any interactive means, because the thread that manages input can't even run to process your input. Mind you, even if the input thread did run at real-time priority, that wouldn't really help you any. Sure, it...

When you use a term, it helps if you know what the term means
Jun 9, 2010
Post comments count 0
Post likes count 0

When you use a term, it helps if you know what the term means

Raymond Chen
Raymond Chen

Some years ago (in a project far, far away) I received a piece of email from a member of the release management team asking me if a particular issue met the escrow reset bug bar or not, as it applied to an upcoming pre-RTM release. I asked, "What is the current escrow reset bar?" I thought this was a fair question. After all, in order to state whether or not the issue met the escrow reset criteria, I needed to know what the escrow reset criteria were. I figured they'd reply with something like "The escrow reset criteria are on this internal Web page. Please evaluate the issue against those criteria and get bac...

Proto-Microspeak: Bug-hugging
Jun 8, 2010
Post comments count 0
Post likes count 0

Proto-Microspeak: Bug-hugging

Raymond Chen
Raymond Chen

As they say, "piss or get off the pot."

Dum dee dum, just hanging around the European Conference on Computer Supported Co-op… OMG LOOK AT THOSE CUTE DUCKS!
Jun 7, 2010
Post comments count 0
Post likes count 0

Dum dee dum, just hanging around the European Conference on Computer Supported Co-op… OMG LOOK AT THOSE CUTE DUCKS!

Raymond Chen
Raymond Chen

The 10th European Conference on Computer Supported Co-operative Work was held in Limerick, Ireland, and as you'd expect there were a lot of speakers and breakout sessions and... oh my God, look at those cute ducks!

Is it real that you are still using Visual C++ 6 and 5?
Jun 7, 2010
Post comments count 0
Post likes count 0

Is it real that you are still using Visual C++ 6 and 5?

Raymond Chen
Raymond Chen

Commenter Sys64738 points out that Bjarne Stroustrup's Web site says that "Literally everything at Microsoft is built using various flavors of Visual C++ - mostly 6.0 and 7.0 but we do have a few holdouts still using 5.0 :-(" and wonders if it's true. Well, let's see. Visual C++ 6 came out in 1998 and doesn't support the /GS flag, nor does it support various replacement functions like . This makes it hard for anything compiled with Visual C++ 6 to conform to Microsoft's Security Development Lifecycle which requires all code to be compiled with /GS and bans functions like . As a result, I would suspect that...

How do I enable and disable the minimize, maximize, and close buttons in my caption bar?
Jun 4, 2010
Post comments count 0
Post likes count 3

How do I enable and disable the minimize, maximize, and close buttons in my caption bar?

Raymond Chen
Raymond Chen

A customer was having problems with the small icon that appears in the upper left corner of the caption: In my program, I need to enable and disable the Close button programmatically, since the program sometimes goes into a state where I don't want the user to close it. I do this by removing the style when I want to disable the Close button, and adding it back when I want to re-enable it. However, doing this has as a side effect that the icon for my program doesn't appear in the title bar any more. If I never touch the style, then it works fine (but then I don't get the enable/disable behavior that I want). ...

The voice of Carl Kasell emerges from the loudspeaker as some old guy stands there and moves his mouth
Jun 3, 2010
Post comments count 0
Post likes count 0

The voice of Carl Kasell emerges from the loudspeaker as some old guy stands there and moves his mouth

Raymond Chen
Raymond Chen

Some time ago, the NPR news quiz Wait Wait... Don't Tell Me taped a show in Seattle. (They're back in town tonight.) I was fortunate to score tickets to that show, in part because I ordered them nearly a full year before taping. Watching the taping of the show is quite a treat, and I recommend it for any fan of the program. You can watch Peter Sagal pace back and forth as he talks and contrast it to old-school radio man Carl Kasell, who stands perfectly still as he delivers his lines. The strangest part of the experience was putting the face to the voice. When Carl Kasell started talking, my reaction was, "Hey...