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

No, but maybe yes.
No, but maybe yes.
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. ...
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...
Finalization is the crazy wildcard in garbage collection. It operates "behind the GC", running after the GC has declared an object dead. Think about it: Finalizers run on objects that have no active references. How can be a reference to an object that has no references? That's just crazy-talk! Finalizers are a Ouija board, permitting dead objec...
More than one customer has asked a question like this: I'm looking for a way to search for all instances of a particular type at runtime. My goal is to invoke a particular method on each of those instances. Note that I did not create these object myself or have any other access to them. Is this possible? Imagine what the world would be like if...
Locations in the shell known folder system can be marked as , which makes them immovable. Conversely, if a file system folder is not immovable, then it can be moved. This dichotomy appears simple and unworthy of discussion, except that customers sometimes have trouble incorporating this concept into their world view. I have some code that calls...
Start with the 0xE06D7363...
Some time ago I had a problem with icon drawing. When I tried to draw an icon with it ended up being drawn at the wrong size. A call to confirmed that the icon was 48×48, but it drew at 32×32. The answer is documented in a backwards sort of way in the function, which says at the bottom, To duplicate DrawIcon (hDC, X, Y, hIcon),...
Some time ago, I opined that should really be called and you really should just let the program crash if somebody passes you a bad pointer. It is common to put pointer validation code at the start of functions for debugging purposes (as long as you don't make logic decisions based on whether the pointer is valid). But if you can't use , how can...
Commenter Chris 'Xenon' Hanson points out that fiddling with the style directly via leads to strange behavior. However it isn't the case that "most widget classes work fine." Reaching in and fiddling the style bit directly is like reaching into a program's internal variables and just changing the values: All the other work that is associated wi...