The Old New Thing

The forgotten common controls: The ShowHideMenuCtl function

The function is one of those functions everybody tries to pretend doesn't exist. You thought was bad; is even worse. The idea behind was that you had a window with a menu as well as controls, and some of the menu items were checkable, indicating whether the corresponding control should be shown. For example, on your View menu you might...

A modest proposal: Solving the problem of traffic in Seattle caused by sporting events

Whenever there is a sporting event in Seattle, traffic is reduced to gridlock for hours both before and after the event. This affects not only the people attending the sporting event in question, but also people who get caught up in the traffic as a side-effect. To resolve this issue, I present this modest proposal. In Berlin, a large ...

Redmond Derby Days 2007 this weekend

Every summer, the city of Redmond stages Derby Days, an annual celebration of... I'm not sure what. But what it does mean is that roads will be closed in the downtown Redmond area, so if you need to get around, you'll have to plan ahead. Several years ago, one of my colleagues asked a City of Redmond employee, "What is Derby Days?" He ...

It rather involved being on the other side of this airtight hatchway: If they can run code, then they can run code

Some people can't get over the initial burst of adrenaline when they think they've found a security vulnerability and rush to file a report with Microsoft so they can get credit for it and add it to their "security vulnerability portfolio" to show that they are so wicked cool. Learning that what they found isn't a security vulnerability isn't...

Raymond's tips on selecting a memorable greeting card

My favorite greeting card is one I got from :: Wendy ::. It was a Christmas card with a picture of kids running around while snow fell all around them. Wendy added the message, "Watch out for that 'rogue' snowball from midfield..." I still have that card on my windowsill years later. My recommendation for choosing a memorable ...

QueryPerformanceCounter is not a source for unique identifiers

This article happened to catch my eye: I needed to generate some unique number in my application. I could use GUID, but it was too large for me (I need to keep lots of unique identifiers). I found something like this: This code generates Int64 (long) unique number (at least I hope it is unique). The uniqueness is in the scope of ...

The audacity of selling things that don't belong to you

NPR some time ago reported on a most audacious scam: Selling someone else's property out from under them. But this guy was small potatoes, selling properties owned by churches and other non-profit organizations. The king in this category of fraud is Victor Lustig, the man who sold the Eiffel Tower... twice...