The Old New Thing

Why do registry keys have a default value?

In addition to all the named values you can create underneath a registry key with the function, there is also the so-called default value which you obtain by passing or a pointer to a null string as the . This default value is also the value set and retrieved when you call and . What's the deal with this default value? The original 16-bit ...

How did registry keys work in 16-bit Windows?

Back in 16-bit Windows, the registry was a very different beast. Originally, the only registry hive was , and the only things it was used for were COM object registration and file type registration. (Prior to the registry, file type registration was done in , and the only verb you could register for was "open".) The registry was stored in a ...

Jerry Springer: The Opera crosses the pond to visit Carnegie Hall

Back in 2002, I noted with some fascination the opening of Jerry Springer: The Opera in London. (Here's coverage in the New York Times. If you're going to skim the article, at least skim all the way to the end, wherein the real Jerry Springer is asked for his opinion.) Opening with the onstage studio audience chanting "Jer-ry! Jer-ry!", a ...

Use WM_WINDOWPOSCHANGING to intercept window state changes

The message is sent early in the window state changing process, unlike , which tells you about what already happened. A crucial difference (aside from the timing) is that you can influence the state change by handling the message and modifying the structure. Here's an example that prevents the window from being resized. Before the ...

Use WM_WINDOWPOSCHANGED to react to window state changes

The documentation for the message points out that the message is not sent under certain circumstances. But what if you want to know when the window is shown, including in the cases where you don't get ? The message is sent at the end of the window state change process. It sort of combines the other state change notifications, , , and . ...

In order to serve you better: Chase resets your marketing preferences

Whenever a company says "In order to serve you better", you can be pretty sure they're about to do something that will make your life more miserable. This time, I'm going to call out Chase Financial Services, who recently sent out notices to customers who had specified that they did not want to receive marketing materials informing them that ...

Windows is not an MFC delivery channel

Depending on what version of Windows you're running, there may be a variety of support DLLs for things that aren't formal product components, but which are merely along for the ride. For example, Windows 95 came with MFC30.DLL because the Fax Viewer was written with the help of MFC 3.0. But if you look at Windows 98, MFC30.DLL ...

The impact of hardworking employees on their less diligent colleagues

Slate investigates the question "Do hardworking employees make their slacker colleagues more productive?" Tim Harford cites the study Peers at Work by Alexandre Mas and Enrico Moretti which used a grocery store check-out line as its laboratory, and the results are illuminating. (It may be hard to find, but the key paragraph is in the middle...