Holy cow, I wrote a book!
There are three functions which test very similar things,
and sometimes applications pick the wrong one.
Here's the rundown:
How can you tell whether a particular button is an old-school
button or a fancy new button?
I don't know either.
From the comments, it appears that people have confused
"a window was created with the visual-styles-enabled version
of the common controls library" with "themes are enabled".
The two are independent concepts.
All four combinations are possible.
I thought I called this out in the article, but apparently
I didn't call it out clearly enough.