The Old New Thing
Practical development throughout the evolution of Windows.
Latest posts

Application compatibility layers are there for the customer, not for the program

The customer is the victim, not the program.

One of the consequences of accepting a job offer is that you might end up working with an interviewer who didn't like you

At an informal gathering, my colleagues and I started talking about our experiences being interviewed at Microsoft. One of the people there remembered how one of the pieces of feedback on the interview lo these many years ago was that although my colleague was certainly smart enough and hardworking enough, there seemed to be insufficient enthusiasm for the subject matter. I mean, my colleague cared about the subject matter but apparently didn't care enough to satisfy the interviewer. The offer was extended despite this reservation, and my colleague joined the team. Years passed, and the details of the encounter w...

Why is the fine for a basic traffic infraction in the state of Washington such a random-looking number?

Willy-Peter Schaub was puzzled by a sign reminding drivers that the fine for obstructing an intersection is $101 and wonders what the extra $1 is for. The laws of the State of Washington defer the monetary value of traffic fines to the Infraction Rules for Courts of Limited Jurisdiction (more commonly known as the IRLJ), specifically section 6.2: Monetary Penalty Schedule for Traffic Infractions [pdf]. But wait, the fine listed in the IRLJ is only $42. Where did $101 come from? In addition to the base fine in the IRLJ, RCW 3.62.090 specifies additional assessments: Section (1) specifies a 70% assessment f...

PSM_ISDIALOGMESSAGE is to modeless property sheets as IsDialogMessage is to modeless dialog boxes

Dialog boxes and property sheets are similar in that most of the time, you use them modally. You call or , and the function doesn't return until the user closes the dialog box or property sheet. But you can also use dialog boxes and property sheets modelessly, using or by including the flag when you call . One of the more common problems people have when managing a modeless property sheet is finding that keyboard navigation doesn't work. The reason is the same as with modeless dialog boxes: You forgot to process dialog messages. But if you use the wrong function to process the dialog messages, then you don't...

The best actors in the business still lean into the microphone when they talk

Now let me get this straight. The Oscars honor, among other things, the best actors in Hollywood. These are people who have devoted their professional careers to reciting dialog in front of a camera and making it look spontaneous and natural. But for some reason, put them on stage at the Oscars, and instead of reciting dialog spontaneously and naturally, they read it stiltedly and lean into the microphone while doing it. And these are the best actors in the business?¹ It's like hosting a music award show and finding that all the performers suck at singing. ¹Oh wait, sorry, it's not a business. It'...

Why doesn't double-right-click bring up the Properties dialog?

kip asks why double-right-click isn't a shortcut for Properties. Recall the logical consequences of the way Windows converts single-clicks into double-clicks. The double-click action is an extension of the single-click action. In the case of context menus, the proposed double-right-click action is not an extension of the single-right-click, because the single-right-click displays a menu, whereas the double-right-click would go directly to the Properties dialog. Indeed, the way context menus are positioned on the screen specifically negates the possibility of double-right-click, for the context menu positions ...

Delegation of responsibilities within a family during pregnancy

When friends of mine were expecting their first child, the wife frequently received comments like "That's okay. You're eating for two now." The husband had a response ready: "If she's eating for two, I'm drinking for three!"

How do I access the magic IEEE floating point values like NaN in code?

There are functions like , , , and for detecting that a floating point value is one of the special values like NaN, but how do you actually generate one of these values? You can access these values from the template. Wait, where's negative infinity? The compiler folks provided these handy little definitions for when you need to generate a special value (as opposed to merely detecting one), and for which the template comes up short. Disclaimer: Applies to Microsoft Visual Studio. Your mileage may vary. Use the template when available. Bonus chatter: Note that you must use functions like to detect...

Everyday is Grammer Day

March fourth is not just a pun on march forth, but it's also National Grammar Day, sponsored by the Society for the Promotion of Good Grammar.