https://bugs.winehq.org/show_bug.cgi?id=38124
--- Comment #5 from Jactry Zeng jactry92@gmail.com --- Hi Nikolay, (In reply to Nikolay Sivov from comment #3)
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.
Thanks for your comment!
What happens on Windows if you don't call load_v6_module() at all? I'd expected both dialogs to be not themed.
You are right.
And I have some other tests about it here: https://gitcafe.com/Jactry/winetests In these tests, I used '#define ISOLATION_AWARE_ENABLED 1' instead of 'Activation Context API'. (There are some others bugs when compile dialog.dll with mingw, so I compile it with MSVC).
All_with_theming: Enable visual style in both main.exe and dialog.dll All_without_theming: Didn't enable visual style in both main.exe and dialog.dll Main_program_with_theming_dialog_without_theming: Visual style was enabled in main.exe but didn't enable in dialog.dll Main_program_without_theming_dialog_with_theming: Visual style was enabled in dialog.dll but didn't enable in main.exe
1.png in every folder is what it looks like in windows. In https://gitcafe.com/Jactry/winetests/blob/master/Main_program_without_themin... we can find the main windows didn't be themed, but the dialog was themed. It is so different to the testcase using 'Activation Context API'.
Do you know the different between ISOLATION_AWARE_ENABLED and 'Activation Context API'? Thanks again!