The Old New Thing

It's not a good idea to give multiple controls on a dialog box the same ID

When you build a dialog, either from a template or by explicitly calling , one of the pieces of information about each control is a child window identifier. And it's probably in your best interest to make sure two controls on the dialog don't have the same ID number. Of course, one consequence of giving two control the same ID number is that...

What is the history of the GetRandomRgn function?

An anonymous commenter was curious about how the function arrived at its strange name, what the purpose of the third parameter is, and why it is inconsistent between Windows 95 and Windows NT. The sense of word "random" here is hacker slang rather than its formal probabilistic definition, specifically sense 2: "Assorted, ...

Globalization quiz: In honor of, well, that's part of the quiz

The Corporate Citizenship Tools; Microsoft Local Language Program Web site contains a map of the world, coded by region. There was a bug on the map. See if you can spot it: After I pointed out the error, they fixed the map on their Web page, so no fair clicking through to the Local Language Program Web page and comparing the pictures! ...

Why don't all of my folder customizations roam with my profile?

A customer reported some inconsistency in how folder customizations are handled by roaming profiles. Why doesn't the customization roam? Well, if you think about it, it makes sense that the setting for doesn't roam because doesn't roam either! The on Server1 is not the same directory as the on Server2. Let's change Step 2 ...

Microsoft Dynamics in a soda can, sort of

It is not uncommon for a product team to produce some custom soda cans (really, carbonated water) for distribution at Microsoft cafeterias. Last year, the Microsoft Dynamics™ CRM 2011 team put some custom cans of sparkling water in the coolers extoling the virtues of their new product. It took the form of a side-by-side feature ...

Fabio coming to Redmond. Also: Whey Protein

Mark your calendars: Fabio Lanzoni, better known to the world as simply Fabio, will be at the Redmond Whole Foods Market on June 21 to promote his whey protein product. (Now made with real Fabio!) And unlike Martha, he will let you take a picture of him. By the way, ladies, he's available...

Why do you have to wait for Windows Error Reporting to check for solutions before it restarts the application?

Leo Davidson wonders why you have to wait for Windows Error Reporting to check for solutions before it restarts the application. Why not do the two in parallel? Well, for one thing, when the application restarts, it might freak out if it sees a dead copy of itself. I know for sure that I would freak out if I woke up one morning and saw my ...

Eventually the window manager simply says that enough is enough

Many window manager operations are recursive, and eventually the window manager will simply say that enough is enough when the recursion goes too deep. We've seen this when you nest windows more than 50 levels deep or nest menus more than 25 levels deep, for example. (Note also that these limits may change in the future, so don't rely on ...