Showing results for May 2014 - Page 3 of 3 - The Old New Thing

May 8, 2014
0
0

How can you use both versions 5 and 6 of the common controls within the same module?

Raymond Chen
Raymond Chen

Commenter Medinoc was baffled by the statement that the decision to use the visual-styles-enabled version of the common controls library is done on a window-by-window basis. " Isn't it rather on a per-module basis, depending on each module's manifest? If it is indeed on a per-window basis, how does one choose?" Whether a particular call to (or ...

Code
May 7, 2014
0
0

Why does saving a file in Notepad fire multiple FindFirstChangeNotification events?

Raymond Chen
Raymond Chen

Many people have noticed that the and functions (and therefore their BCL equivalent and WinRT equivalent ) fire multiple events when you save a file in Notepad. Why is that? Because multiple things were modified. Notepad opens the file for writing, writes the new data, calls to truncate any excess data (in case the new file is shorter than t...

Code
May 6, 2014
0
0

Letting the boss think your project is classier than it really is

Raymond Chen
Raymond Chen

Once upon a time, there was a team developing two versions of a product, the first a short-term project to ship soon, and the other a more ambitious project to ship later. (Sound familiar?) They chose to assign the projects code names Ren and Stimpy, in honor of the lead characters from the eponymous cartoon series. Over time, the two projects me...

History
May 5, 2014
0
0

Warehouse holding 1000 cans of surströmming burns to the ground, insert punch line here

Raymond Chen
Raymond Chen

A warehouse in Sweden holding 1000 cans of surströmming burned to the ground last week. No people were injured. The cans of surströmming, already prone to violent decompression under normal conditions, exploded over a period of six hours. Some of them turned into projectiles and shot through the air. No information on what effect this ...

May 5, 2014
0
0

Getting the location of the Close button in the title bar

Raymond Chen
Raymond Chen

Today's Little Program locates the × button in the corner of the window and, just to show that it found it, displays a balloon tip pointing at it. Let's start with the program from last week, the one that displays a balloon tip, then make these changes: Instead of positioning the balloon at the cursor position, we put it at the center ...

Code