Attempt to make buttons themed

Dmitry Timoshkov dmitry at
Tue Mar 22 02:22:25 CST 2005

"Frank Richter" <resqu at> wrote:

> to see how easy (or not) it would be to make the controls use themes, I 
> tried to get themed buttons; the result is the attached patch (to try it 
> out, you need an .msstyles file and appropriate registry setup). It's 
> probably not perfect as it is, comments/questions are welcome.
> Screenshot:
> Some funny side effect when theming is enabled: applications show up in 
> standard colors, but as soon as the first button is created, the colors 
> switch to the theme's colors. I guess opening the theme data in the 
> button code triggers some uxtheme initialization that in turn changes 
> the system colors.
> Also, all applications get themed buttons, which diverges from WinXPs 
> behaviour and may or may not be desired for some apps.

user32 can not depend on uxtheme or any other high level dll. You need to
make all the work inside of uxtheme by subclassing/patching every class you
wish to change the painting for, and do all the painting inside of uxtheme.
I'm not sure how to do it cleanly without adding an explicit dependency of
every app on uxtheme. Do you know how Windows does themeing on low level?


More information about the wine-devel mailing list