The Old New Thing

Das Buch der verrückten Experimente

The Annals of Improbable Research tipped me off to Reto Schneider's Das Buch der verrückten Experimente (The Book of Weird Experiments in English), a collection of descriptions of one hundred scientific experiments throughout the course of history. As you might expect from the title, the experiments are all somewhat strange, yet ...

On the fuzzy definition of a "Unicode application"

Commenter mpz wondered why the IME cannot detect whether it is sending characters to a Unicode or non-Unicode application and generate the appropriate character accordingly. But what exactly is a Unicode application? Actually, let me turn the question around: What is a non-Unicode application? Suppose you write a program and don't #define ...

Top ten things to do to make your application a Vista application

On MSDN, there's a series of articles on the top ten things to do to make your application a Vista application. The series began last December, and just this month, they covered a topic dear to my heart: Application compatibility. [Update 2pm: If you have feedback about these articles, posting that feedback here won't accomplish much since...

Controlling resource consumption by meting out work items

At the PDC, one person came to talk to me for advice on a resource management problem they were having. To simplify, their system generated dozens of work items, each of which required significant resource consumption. For the sake of illustration, let's say that each of the work items was a single-threaded computationally-intensive operation ...
Comments are closed.0 0
Code

A thread waiting on a synchronization object could be caught napping

If you have a synchronization object, say a semaphore, and two threads waiting on the semaphore, and you then release two semaphore tokens with a single call to ReleaseSempahore, you would expect that each of the waiting threads would be woken, each obtaining one token. And in fact, that's what happens—most of the time. Recall in our ...
Comments are closed.0 0
Code

Why does the size of a combo box include the size of the drop-down?

Many people are surprised to discover that when you create a combo box (either in code via CreateWindow or indirectly via a dialog box template), the size you specify describes the size of the combo box including the drop-down list box, even though the drop-down list box is not visible on the screen. For example, if you say that you want the ...

If you ask for a window caption, you also get a border

Some people may have noticed that the WS_CAPTION is defined as the combination of WS_BORDER and WS_DLGFRAME: Since WS_CAPTION includes WS_BORDER, it is impossible to get a caption without a border. Sometimes people don't quite get this and keep asking the question over and over again, and I have to keep trying to explain the laws of ...
Comments are closed.0 0
Code

Feedback usabilla icon