Showing results for August 2010 - The Old New Thing

Aug 31, 2010
0
0

Shutdown reason codes are reason codes, not error codes or HRESULTs

Raymond Chen
Raymond Chen

A customer liaison asked the following question on behalf of his customer: My customer is finding that their Windows Server 2003 system has restarted, and they want to find out why. I've found some event log similar to the ones below, but I don't know what error code is. I've searched the Knowledge Base but couldn't find anything relevant. Ple...

Tips/Support
Aug 31, 2010
0
0

Be on the alert: Mainstream and alternative medicines mixed together on the store shelves, not clearly distinguished

Raymond Chen
Raymond Chen

I was in the supermarket looking for cold medicine, and as is my wont, I like to read the fine print before choosing a product. Most of the products listed their active ingredients in the form Active Ingredient: XYZ 150mg. But there were a few that said Active Ingredient: XYZ 6X. What is this 6X? How much is 6X? Six times what? A closer...

Non-Computer
Aug 30, 2010
0
0

On LockWindowUpdate: Locking the taskbar

Raymond Chen
Raymond Chen

Andy Visser posted to the Suggestion Box something that wasn't so much a suggestion as a comment, presumably to get around the fact that comments on the original item had been closed: "I've found that the start bar seems to behave like it may be using this call incorrectly. I put my start bar on the left hand side of the screen. When I try to resiz...

Other
Aug 26, 2010
0
0

How do I recover the window handle passed to ShellExecute?

Raymond Chen
Raymond Chen

A customer had the following question: I'm using the function to launch a new process and am passing the handle to my application's main window as the parameter. From the new process, I want to get information from the old process, and to do that, I need the window handle. How can I recover that window handle from the new process? You can't. ...

Code
Aug 25, 2010
0
0

What young children do when they hear a foreign language

Raymond Chen
Raymond Chen

My young nieces live in a Chinese-speaking household, which is great for them because it means that when they grow up, they will be fluent in two languages. But it makes things a bit tricky at the beginning. The niece who is the subject of this story had just turned two at the time this story takes place, so her language skills even in Chinese are...

Non-Computer
Aug 23, 2010
0
0

Be careful that your splash screen doesn't squander the foreground love

Raymond Chen
Raymond Chen

Commenter Erbi has a program which creates a splash screen on a background thread while the main thread initializes. "I create and then destroy this splash screen window just before creating and displaying the main window." The problem is that the main window fails to obtain foreground activation. Commenting out the code that creates the splash scr...

Code