The Old New Thing

City noises and their effects on songbirds

Robins in Sheffield sing at night because it's too noisy in the daytime. That reminds me that when I was in Antigua, Guatemala, I was told that the songbirds in the city have started mimicking car alarms. Apparently this is also happening in Oregon with birds mimicking car alarms and cell phone ring tones...

The operating system doesn't know which language programs are written in – by the time the code hits the CPU, they all look the same

Reader Will Rayer asks about "the degree to which 'plain vanilla' C Windows API code works under Vista with the native look and feel." It works just as well as code written in any other language. The operating system doesn't know which language programs are written in. By the time the code reaches the CPU, they all look the same. It's just ...
Comments are closed.0Other

Restating the obvious about the WM_NOTIFY message

It appears that people seemed to appreciate restating the obvious about the WM_COMMAND message, so I'll try it again with the WM_NOTIFY message. The WM_NOTIFY message is typically used by a control to communicate with its parent, either to provide information, request it, or both. Although that is the typical use, there are exceptions. For...
Comments are closed.0Code

Why does Windows wait longer than my screen saver idle timeout before starting the screen saver?

You may find yourself in a situation where Windows takes longer than your specified screen saver idle timeout to start the screen saver. First of all, there are ways for programs to block the screen saver entirely. Calling SetThreadExecutionState(ES_DISPLAY_REQUIRED), is how a program says, "Even though there is no mouse or keyboard input, ...

There's no law that says a meeting can't end early

Meetings run over all the time. In fact, you might say that that's their natural state. Meetings think gases are lazy. Whereas a gas expands to fill its container, a meeting expands to exceed the size of its container. It requires good management skills to keep all your meetings on schedule. And it takes great management skills to get them ...

Microspeak: Action on

I have been fortunate to have been spared exposure to this particular corner of Microspeak, but others have not been so lucky. Have you actioned on this ask? It's not clear whether actioning on something means that you've started it or you've finished it. As a result, this is another case of using jargon to impede communication. The ...

The format rectangle is recalculated whenever the window resizes, and that's a good thing

Reader asmguru62 asks why a custom format rectangle of a multi-line edit control is lost when the edit control is resized. That's right, the format rectangle is recalculated whenever the window resizes, and that's a good thing. Imagine if it weren't recalculated. You create a multi-line edit control. Like many programs, you might create it ...
Comments are closed.0Code

Why can't I declare a type that derives from a generic type parameter?

A lot of questions about C# generics come from the starting point that they are just a cutesy C# name for C++ templates. But while the two may look similar in the source code, they are actually quite different. C++ templates are macros on steroids. No code gets generated when a template is "compiled"; the compiler merely hangs onto the ...
Comments are closed.0Code

Landing the Space Shuttle is hard enough as it is

I was at The Museum of Flight and was waiting my turn at the Space Shuttle landing simulator. A six-year-old settled into the control seat, and as the simulation began I heard him ask his father, "Where are the bad guys?" I'm pretty sure the Space Shuttle doesn't come with onboard missiles. That didn't stop the kid from pressing the ...