From: Dmitry Timoshkov dmitry@baikal.ru
Themed Delphi applications use "explorer::listview" and "explorer::treeview": https://gitlab.com/freepascal.org/lazarus/lazarus/-/blob/main/lcl/interfaces...
Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- dlls/uxtheme/system.c | 15 ++++++++++++++- dlls/uxtheme/tests/system.c | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/dlls/uxtheme/system.c b/dlls/uxtheme/system.c index 156051406e3..441ea8146df 100644 --- a/dlls/uxtheme/system.c +++ b/dlls/uxtheme/system.c @@ -640,7 +640,20 @@ static HTHEME open_theme_data(HWND hwnd, LPCWSTR pszClassList, DWORD flags, UINT pszUseClassList = pszClassList;
if (pszUseClassList) - hTheme = MSSTYLES_OpenThemeClass(pszAppName, pszUseClassList, dpi); + { + const WCHAR *p = wcschr(pszUseClassList, ':'); + if (p) + { + p++; + lstrcpynW(szAppBuff, pszUseClassList, min(p - pszUseClassList, 256)); + szAppBuff[p - pszUseClassList] = 0; + if (*p == ':') p++; + lstrcpynW(szClassBuff, p, min(wcslen(p) + 1, 256)); + hTheme = MSSTYLES_OpenThemeClass(pszAppName ? pszAppName : szAppBuff, szClassBuff, dpi); + } + else + hTheme = MSSTYLES_OpenThemeClass(pszAppName, pszUseClassList, dpi); + }
/* Fall back to default class if the specified subclass is not found */ if (!hTheme) diff --git a/dlls/uxtheme/tests/system.c b/dlls/uxtheme/tests/system.c index accb000f728..edbab8e5a63 100644 --- a/dlls/uxtheme/tests/system.c +++ b/dlls/uxtheme/tests/system.c @@ -2657,7 +2657,7 @@ static void test_OpenThemeData_class(void) BOOL win8_fail = !lstrcmpW(app_class[i], L"clock") || !lstrcmpW(app_class[i], L"page") || !lstrcmpW(app_class[i], L"traynotify");
htheme = OpenThemeData(hwnd, app_class[i]); - todo_wine_if(i == 3 || i == 6 || i == 12 || i == 15 || i == 16 || i == 21) + todo_wine_if(i == 3 || i == 6 || i == 12 || i == 15 || i == 16) ok(htheme != NULL || broken(win8_fail), "OpenThemeData(%s) error %#lx.\n", wine_dbgstr_w(app_class[i]), GetLastError()); CloseThemeData(htheme); }