Showing results for April 2005 - Page 2 of 3 - The Old New Thing

Apr 20, 2005
0
0

What is the DC brush good for?

Raymond Chen
Raymond Chen

The DC brush is a stock brush associated with the device context. Like the system color brushes, the color of the DC brush changes dynamically, but whereas the system color brushes change color based on the system colors, the color of the DC brush changes at your command. The DC brush is handy when you need a solid color brush for a very shor...

Code
Apr 19, 2005
0
0

When people ask for security holes as features: Hiding files from Explorer

Raymond Chen
Raymond Chen

By default, Explorer does not show files that have the flag, since somebody went out of their way to hide those files from view. You can, of course, ask that such files be shown anyway by going to Folder Options and selecting "Show hidden files and folders". This shows files and folders even if they are marked as . On the other hand, files that ...

HistoryWhen people ask for security holes as features
Apr 18, 2005
0
0

Project update: Voyage to Our Hollow Earth

Raymond Chen
Raymond Chen

In December 2003, I reported on Steve Currey's expedition to the hole at the top of the earth, which at the time was scheduled for June 26, 2005. But on May 6, 2004, the site rescheduled the trip for Jun 26, 2006 with no explanation. The reservation form reminds you that the 25% deposit is non-refundable. Far be it from me to suggest that thes...

Non-Computer
Apr 18, 2005
0
4

What is the HINSTANCE passed to CreateWindow and RegisterClass used for?

Raymond Chen
Raymond Chen

One of the less-understood parameters to the function and the function is the (either passed as a parameter or as part of the structure). The window class name is not sufficient to identify the class uniquely. Each process has its own window class list, and each entry in the window class list consists of an instance handle and a class nam...

Code
Apr 15, 2005
0
0

News flash: Everybody has to pay income tax

Raymond Chen
Raymond Chen

NFL rookies are required to attend "How not to mess up your life like those other professional athletes" training. They learn about such things as sexual harassment, AIDS, common-law marriage, and, of course, taxes. Kendrell Bell, a Pittsburgh Steelers linebacker, tells of his great awakening to the verities of income tax: "I got a million-dollar...

Non-ComputerNews flash
Apr 15, 2005
0
0

Tweaking our computation of the interval between two moments in time

Raymond Chen
Raymond Chen

We can take our computation of the interval between two moments in time and combine it with the trick we developed for using the powers of mathematics to simplify multi-level comparisons to reduce the amount of work we impose upon the time/date engine. Observe that we avoided a call to the method (which is presumably rather complicated becau...

Code
Apr 14, 2005
0
0

Computing the interval between two moments in time

Raymond Chen
Raymond Chen

Computing the interval between two moments in time is easy: It's just subtraction, but subtraction may not be what you want. If you are displaying time units on the order of months and years, then you run into the problem that a month is of variable length. some people just take the value relative to a base date of January 1 and extract the yea...

Code
Apr 13, 2005
0
0

Using the powers of mathematics to simplify multi-level comparisons

Raymond Chen
Raymond Chen

What a boring title. Often you'll find yourself needing to perform a multi-level comparison. The most common example of this is performing a version check when there are major and minor version numbers involved. Bad version number checks are one of the most common sources of errors. If you're comparing version numbers, you can use the funct...

Code
Apr 12, 2005
0
0

There's an awful lot of overclocking out there

Raymond Chen
Raymond Chen

A bunch of us were going through some Windows crashes that people sent in by clicking the "Send Error Report" button in the crash dialog. And there were huge numbers of them that made no sense whatsoever. For example, there would be code sequences like this: Yet when we looked at the error report, the and registers were equal! There were othe...

Other
Apr 11, 2005
0
0

The end of one of the oldest computers at Microsoft still doing useful work

Raymond Chen
Raymond Chen

My building was scheduled for a carpet replacement—in all my years at Microsoft, I think this is the first time this has ever happened to a building I was in—so we all had to pack up our things so the carpeters could get clear access to the floor. You go through all the pain of an office move (packing all your things) but don't get the ...

OtherDead computers