The Old New Thing

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

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

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

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 0x84020004 is. I've searched the Knowledge Base but couldn't find ...

On LockWindowUpdate: Locking the taskbar

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

If you return from the main thread, does the process exit?

If instead of calling ExitProcess you merely return from the main thread of a process, does the process terminate? No, but maybe yes. This is another one of the places where the C runtime behaves differently from raw Win32. Under raw Win32, a process exits when any thread chooses to exit the process explicitly (usually by calling ...
Comments are closed.0 0
Code

How do I recover the window handle passed to ShellExecute?

A customer had the following question: I'm using the ShellExecute function to launch a new process and am passing the handle to my application's main window as the hwnd 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 ...
Comments are closed.0 0
Code

What young children do when they hear a foreign language

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

Why did the Explore option disappear from the context menu of folders in the second column of the Start menu?

A customer noticed that when you right-click on Computer in the second column of the Start menu on Windows Vista, the first two options are Open and Explore. On the other hand, in Windows 7, the Explore option is gone, leaving just Open. The customer also noticed that in Windows Vista, the two commands had the same effect and ...

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

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 ...
Comments are closed.0 0
Code

Feedback usabilla icon