Showing results for June 2012 - Page 2 of 3 - The Old New Thing

Jun 19, 2012
0
0

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

Raymond Chen
Raymond Chen

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 the ...

Code
Jun 18, 2012
0
0

What is the history of the GetRandomRgn function?

Raymond Chen
Raymond Chen

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, undistin...

History
Jun 15, 2012
0
0

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

Raymond Chen
Raymond Chen

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! Non-use...

Other
Jun 14, 2012
0
0

Now that Windows makes it harder for your program to block shutdown, how do you block shutdown?

Raymond Chen
Raymond Chen

Up until Windows XP, applications could intercept the message and tell Windows, "No, don't shut down." If they were polite about it, they would also inform the user which application blocked system shutdown and why. And if they were really polite about it, they would even provide a way for the user to say, "I don't care; shut down anyway." A...

Code
Jun 13, 2012
0
0

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

Raymond Chen
Raymond Chen

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 slightly:...

Tips/Support
Jun 12, 2012
0
0

Microsoft Dynamics in a soda can, sort of

Raymond Chen
Raymond Chen

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 comparison. ...

Non-Computer
Jun 11, 2012
0
0

Fabio coming to Redmond. Also: Whey Protein

Raymond Chen
Raymond Chen

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!

Non-Computer
Jun 8, 2012
0
0

How can I determine the underlying cause of a EXCEPTION_IN_PAGE_ERROR exception?

Raymond Chen
Raymond Chen

A customer was using memory-mapped files and installed an exception handler to log in-page errors in the memory-mapped file region. They wanted to know how they could obtain the real disk error that resulted in the memory manager not being able to page-in the requested data. Finding the answer isn't that hard. A quick search for reveals that ...

Code
Jun 7, 2012
0
0

Eventually the window manager simply says that enough is enough

Raymond Chen
Raymond Chen

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 being a...

Code