The Old New Thing

Alternatives to using the #error directive to check whether the compiler even sees you

In response to my description of how you can use the #error directive to check whether the compiler even sees you, some commenters proposed alternatives. I never claimed that my technique was the only one, just that it was another option available to you. Here are some other options. scott suggested merely typing asdasdasd into the header ...
Comments are closed.0 0
Code

An unexpected application of the First Law of Thermodynamics

This past winter, my furnace failed catastrophically. (The furnace repair person told me that when furnaces fail, it tends to be catastrophic failure.) It was a few days before everything was back in order, and the very day everything was working again, the furnace belonging to one of my relatives stopped working. This was an application of ...

I’m sorry, you don’t have permission to know where this shortcut file should show up in the Explorer window

Commenter Gabe suggested that the shortcut file should contain a bit that indicates whether the target of the shortcut is a folder, so that shortcuts to folders can sort with real folders. "That would allow them to sort properly without doing any additional work beyond that required to see its icon." (Commenter Josh agreed that "The ...

Before designing and implementing around an assumption, it helps to check that your assumption is true

When your component depends on another component in the project, and that other component is missing features you need, you have a few ways of resolving the situation. Most people would recommend working with the people responsible for the other component during the project planning phase and coming to some sort of understanding about what ...

How to hide privacy violations in a privacy disclosure statement, part 2

It seems that nearly every privacy statement somebody sends me doesn't actually protect my privacy. They start out saying all sorts of great things, like Company X is committed to maintaining the privacy of its customers. After the section listing what information they collect, there's the section describing who they will disclose it...

The latest installment of Wallace and Gromit coming to Seattle

The Seattle International Film Festival is under way, and you get only one chance to see Wallace and Gromit: A Matter of Loaf and Death, featuring our favorite inventor/cheese-aficionado and his trusty sidekick on their latest animated adventure. Be there on Saturday morning, but please leave the Stinking Bishop at home...

Why can’t you change the alignment of an edit control after it has been created?

Commenter Kevin Eshbach asks why you cannot programatically change the text centering style of an edit control after the control has been created. The edit control is one of the original window manager controls, so it comes with a lot of history. First thing to note is that the WM_STYLECHANGED message did not exist until Windows 95. ...
Comments are closed.0 0
Code