The Old New Thing

Why can't I create my dialog box? Rookie mistake #2

Another class of rookie mistake is less obvious from looking at the code. The problem with this code is that we forgot to call InitCommonControlsEx to register the listview class. More generally, the problem is that one of the controls on the dialog uses a window class that was not registered. (For example, maybe there's a rich edit ...
Comments are closed.0 0
Code

Why can't I create my dialog box? Rookie mistake #1

Each dialog box resource is specified either by an integer ordinal or by a string name. But a simple typo will turn one into the other. Do you see the two "classic rookie mistakes"? It may be easier to spot if you take the resource file and send it through the preprocessor first: The first call to DialogBox passes TEXT("DLG_OPEN") as ...
Comments are closed.0 0
Code

Public service announcement for United States taxpayers: In tax year 2006, you can claim a $30 refund if you owned a telephone

The United States government authorized a one-time refund of long-distance excise taxes paid between March 2003 and July 2006, but early returns suggest that many taxpayers are unaware of this refund. (Here's the IRS press release that goes into more detail and includes a list of most common mistakes people have been making.) The easy way ...

Why did Explorer say "The target you specified is on the desktop"?

In Windows 95, if you had a shortcut to a file on the desktop, view the shortcut's properties, and then clicked "Find Target", you got the message "The target you specified is on the desktop". It also selected the item on the desktop to help you find it. But why didn't it just open an Explorer window that viewed the desktop? Because in ...

The publicity machine doesn't stop: TechNet podcast interview

The TechNet Magazine Podcast page has just posted their February 2007 entry, which includes an interview with little old me in the second half. I haven't listened to the whole interview yet, but what struck me immediately is that I was pretty darned punchy and goofy, whereas I think the host was trying to take a more serious tone. Oops...

Super Bowl Sunday: The day the entire country stops doing anything

This upcoming Sunday features an event that means absolutely nothing to people outside the United States: The Super Bowl. I call it an event because it is more than simply a football game. It's an American institution. Even people who think a nose guard is a piece of safety equipment will watch the game, or at least pretend to be interested ...

The ironic thing about fixing a bug

The ironic thing about fixing a bug, or at least once I mention on this web site that I fixed a particular bug, is that people immediately complain that I didn't fix some other bug. One school of complaint believes that cosmetic bugs should be fixed first: "You suck. I mean, look at these egregious cosmetic bugs. If you can't get even those...

The network interoperability compatibility problem, second follow-up

I post this entry with great reluctance, because I can feel the heat from the pilot lights of the flame throwers all the way from here. The struggle with the network interoperability problem continued for several months after I brought up the topic. In that time, a significant number of network attached storage devices were found that did ...