Is SetLayeredWindowAttributes + DwmExtendFrameIntoClientArea a valid thing to do? IIRC SetLayeredWindowAttributes had problems with the DWM in the early Vista days.
You are using "CompositedWindow::Window" when loading and "Window" in WM_THEMECHANGED, this can't be correct can it?
Also, you are hard-coding a 2px change in what I assume is some sort of button border hack? What about alternative Visual Styles?
1. I've tested on Vista and it seems to work OK. Maybe I shouldn't bother though and just go with the black brush method. Both methods are written about by Microsoft developers though IIRC.
2. Well spotted. Will fix.
3. Yes. I'm having to set the inner part of the button to opaque to fix the black->transparent button text. I originally used 4px but 2px seems to be the minimum. I never thought of other themes. Not sure if there is a better way to do this without having to draw the button myself. Any ideas?
Stu