Attempt to make buttons themed

Frank Richter resqu at
Tue Mar 22 06:44:08 CST 2005

On 22.03.2005 09:22, Dmitry Timoshkov wrote:
> 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?

Unfortunately, subclassing from uxtheme or so is probably a magnitude 
more complicated than the straightforward approach to do the theming in 
the controls themselves.
Apparently, having user depending on uxtheme seems to work fine. Are 
there any specific concerns you have about a user->uxtheme dependency?

How Windows is doing theming I don't know completely. You enable theming 
by adding a manifest to the executable which instructs Windows to load 
comctl32.dll version 6.0 instead of version 5.x from system32/. That 
makes me believe that actually comctl32.dll is responsible for applying 
themes to controls (and not uxtheme); how it does it exactly, I don't 
know. Subclassing is a good guess I'd think, or maybe something like 
re-registering the standard control classes (if that is possible).

However, Windows also themes the non-client area of (almost) all apps 
even if they don't use comctl32 6.0. That must happen somewhere, too.


More information about the wine-devel mailing list