The Old New Thing

Strange uses for window class atoms

When you register a window class (with the or function), you get an back. What use is this atom? Not much. You can use this atom in many places where a window class name can be used; just convert it to a string with the macro. Let's change our scratch program to illustrate: We save the atom returned by the function and use it (...

Book me the next flight to Tokyo, no wait, the second flight

I know someone who has a brother who works in Taipei, Taiwan. He travels to Japan often on business, and one day he needed to fly to Tokyo on short notice. He instructed his assistant to book the next flight from Taipei to Tokyo. This is what he got. (Warning: Contains strange music.) That's right. His assistant booked him on Hello Kitty ...

Some other places atoms (and the magical 0xC000) arise

The moment the Windows developers got a system for converting strings into numbers, they could use it anywhere they need to, well, convert a string into a number. Somtimes these integers are officially declared as atoms, but most of the time they are just integers that happen to be atoms under the covers. I'll start with registered window ...

Racking up the frequent shopper points at the register office

In Scotland, a 24-year-old woman got married for the fourth time. The first three ended under unusual circumstances. Let's see, for starters, marriage number one ended when her husband ran off to marry her mom, and the woman even served as a bridesmaid at her mother's wedding. Oh, and a musical thong was also involved. When I read this ...

Why do atoms start at 0xC000?

There are two types of atoms, so-called integer atoms, which are just small integers, and, um, atoms that don't have a special adjective; these plain vanilla atoms come from functions like . (For the purpose of this discussion, I'll call them string atoms.) The atom zero is invalid (); atoms 1 through † are integer atoms, and atoms from...

In search of: Rossio Train Station

While wandering around the central Lisbon area, I remember walking past an ornate building that had people streaming out of it. As I neared the entrance, I realized, "Oh, it's the train station." And then some days later, I wanted to catch the train to Sintra, but forgot exactly where the Rossio Train Station was. "It's at the south end of ...

Why does clearing document history also clear Run history?

Commenter John Topley wondered why clearing document history also clears Run history. Simple: Because people wanted it to. Originally, the button merely erased your recent document history, but with the increasing paranoia over what records the computer kept on your past usage, people began to expect more and even filed beta bugs saying, "I ...

News flash: Universities are more likely to admit students whose parents gave lots of money

Earlier, we saw that alumni give money to universities in order to increase the likelihood that the university will admit their children. Today, we learn that the tactic works. The children of big-donor alumni are more likely to be accepted. In fact, you don't even have to be the child of alumni. Just make sure you parents give lots of ...