The Old New Thing

The dialog manager, part 2: Creating the frame window

The dialog template describes what the dialog box should look like, so the dialog manager walks the template and follows the instructions therein. It's pretty straightforward; there isn't much room for decision-making. You just do what the template says. For simplicity, I'm going to assume that the dialog template is an extended dialog ...

The dialog manager, part 1: Warm-ups

I think a lot of confusion about the dialog manager stems from not really understanding how it works. It's really not that bad. I'll start by describing how dialog boxes are created over the next few articles, then move on to the dialog message loop, and wrap up with some topics regarding navigation. There will be nine parts in all. The ...

When a program asks you a question and then gets upset if you answer it

JeffDav's story of a program that didn't like it when he told it where to install reminded me of another program that we dealt with during Windows 95 development. This was a big-name program developed by one of the biggest-of-the-big name software companies. Let's give this program the imaginary name "LitWare". Its setup program asked ...

The CEO-to-English Phrase Book, a continuing series from Slate

I'm an economics geek, so of course I'm a fan of Slate's Moneybox column as well as The Dismal Science and most of all, Steven Landsburg's gleefully provocative Everyday Economics. I'm also a language geek, so I've been quite enjoying the occasional Moneybox articles which decode CEO speak into plain English titled The CEO-English Phrase ...

The invisible price reduction

Swedish discount warehouse chain Coop Forum is running an advertising campaign claiming "New Lower Prices!", but how can you tell? Apparently you're not supposed to (shocking!) compare current prices against what they were before the ad campaign. Raymond's bad translation follows. Coops "new" price reduction not new A major new price ...

Pointers to virtual functions with adjustors

As a mental exercise, let's combine two mind-numbing facts about pointers to member functions, namely that all pointers to virtual functions look the same and that pointers to member functions are very strange animals. The result may make your head explode. Consider: Here, the variable consists of a code pointer and an adjustor. The ...

Why does the debugger show me the wrong virtual function?

Pointers to virtual functions all look basically the same and therefore, as we learned last time, all end up merged into a single function. Here's a contrived example: If you take a look at and you'll see that the point to the same function: That's because the virtual functions and are both stored in the same location relative to ...

Why does the debugger show me the wrong function?

Often you'll be minding your own business debugging some code, and you decide to step into one function and the debugger shows that you're in some other function. How did that happen? You then step through code that does something like this: And when you step into the call to you find yourself in . What happened? What happened is ...