https://bugs.winehq.org/show_bug.cgi?id=38124
--- Comment #3 from Nikolay Sivov bunglehead@gmail.com --- Short answer is no - Wine doesn't implement any of that properly. In your test case you statically link to dialog.dll, which means that by the time you call CreateWindow("BUTTON") you already have a context activated from dll's PROCESS_ATTACH. Wine's own comctl32 doesn't care at all about active context, it's simply never used, and theme is enabled as soon as you enable it globally with winecfg. So it's not easy to compare this to what Windows does, because it's already different in more than one aspect:
- we have only one comctl32 that tries to implement everything, instead of having 2 (at least), with one in system32 and the rest in WinSxS; - user32 controls are subclasses in comctl32, and I believe that's not what Windows does; - classes made available with context are not picked up by user32, it's simply not aware of that fact.
What happens on Windows if you don't call load_v6_module() at all? I'd expected both dialogs to be not themed.