The Old New Thing

When Marketing edits your PDC talk description

A few years ago, I told a story of how Marketing messed up a bunch of PDC slides by "helpfully" expanding acronyms... into the wrong phrases. Today I got to see Marketing's handiwork again, as they edited my talk description. (Oh, and psst, Marketing folks, you might want to link to the full list of PDC sessions from your Conference Tracks ...

The best book on ActiveX programming ever written

I was introduced to the glory that is the world of Mr. Bunny many years ago. Mr. Bunny's Guide to ActiveX is probably the best book on ActiveX programming ever written. If you haven't figured it out by now, it's a humor book, but it's the sort of madcap insane geek humor that has enough truth in it to make you laugh more. My favorite is ...

How can I recover the dialog resource ID from a dialog window handle?

Occasionally, I see someone ask a question like the following. I have the handle to a dialog window. How can I get the original dialog resource ID that the dialog was created from? As we saw in our in-depth discussion of how dialogs are created from dialog templates, the dialog template itself is not saved anywhere. The purpose of a ...

What struck me about life in the Republic

When people asked me for my reaction to the most recent Star Wars movie, I replied that what struck me most was that the Republic doesn't appear to have any building codes. There are these platforms several hundred meters above the ground with no railings. For example, Padmé Amidala's fancy apartment has a front porch far above the ...

What are SYSTEM_FONT and DEFAULT_GUI_FONT?

Among the things you can get with the function are two fonts called and . What are they? They are fonts nobody uses any more. Back in the old days of Windows 2.0, the font used for dialog boxes was a bitmap font called System. This is the font that retrieves, and it is still the default dialog box font for compatibility reasons. ...

What’s the point of DeferWindowPos?

The purpose of the DeferWindowPos function is to move multiple child windows at one go. This reduces somewhat the amount of repainting that goes on when windows move around. Take that DC brush sample from a few months ago and make the following changes: HWND g_hwndChildren[2]; BOOL OnCreate(HWND hwnd, LPCREATESTRUCT lpcs) { const ...