Showing results for February 2014 - The Old New Thing

Feb 27, 2014
0
0

What does the SEE_MASK_UNICODE flag in ShellExecuteEx actually do?

Raymond Chen
Raymond Chen

Somebody with a rude name wonders what the flag does. It does nothing. The flag was introduced when porting the Windows 95 shell to Windows NT. It happened further back in history than I have permission to access the Windows source code history database, but I can guess how it got introduced. One of the things that the porting team ...

Code
Feb 25, 2014
0
0

A simple email introduction: Fan mail

Raymond Chen
Raymond Chen

One of my former colleagues on the Windows kernel team wasn't afraid to make changes all across the system when necessary. If the engineering team decided to upgrade to a new version of the C++ compiler, my colleague was the one who gave it a test-drive on the entire Windows source code, and fixed all the warnings and errors that kick up as well as...

Non-Computer
Feb 24, 2014
0
0

Nieces sometimes extrapolate from insufficient contextual data

Raymond Chen
Raymond Chen

My brother-in-law enjoys greeting his nieces when they come over to visit by throwing them into the air and asking, "叫聲我?" (Who am I?) The nieces happily reply, "舅舅." (Uncle.) He then tosses them up into the air a second time and says, "大聲啲!" (Louder!) And the nieces happily shout, "舅...

Non-Computer
Feb 24, 2014
0
0

Logging the contents of every message box dialog via automation

Raymond Chen
Raymond Chen

Today's Little Program logs the contents of every message box dialog, or anything that vaguely resembles a message box dialog. (Since there's no way for sure to know whether a dialog box is a message box or not.) This is the same pattern as the program we wrote last week, but with different guts when the window opens. This time, we see if the...

Code
Feb 21, 2014
0
0

How can I make sure my program is launched only from my helper program and no other parent?

Raymond Chen
Raymond Chen

Say you have a collection of programs which work together. One of them is the "master" program that runs the show, and it has a bunch of "assistant" programs that it launches to accomplish various subtasks. These assistants are not meant to be run by themselves; they are meant to be run only by the master program. How do you design the assistant so...

Code
Feb 19, 2014
0
0

When will the static control automatically delete the image loaded into it, and when is it the responsibility of the application?

Raymond Chen
Raymond Chen

If you create a static control with initial contents (for example, by creating a or control in a dialog template), then the static control will load the contents upon creation and destroy the contents upon destruction. So at least in the case where you don't touch the static control, things will work automatically. But once you touch it, ...

Code

Feedback