Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50113 Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com --- dlls/uxtheme/system.c | 4 ++++ dlls/uxtheme/tests/system.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/dlls/uxtheme/system.c b/dlls/uxtheme/system.c index a37e532500a..aaef03f0205 100644 --- a/dlls/uxtheme/system.c +++ b/dlls/uxtheme/system.c @@ -634,6 +634,10 @@ HTHEME WINAPI OpenThemeDataEx(HWND hwnd, LPCWSTR pszClassList, DWORD flags)
if (pszUseClassList) hTheme = MSSTYLES_OpenThemeClass(pszAppName, pszUseClassList); + + /* Fall back to default class if the specified subclass is not found */ + if (!hTheme) + hTheme = MSSTYLES_OpenThemeClass(NULL, pszUseClassList); } if(IsWindow(hwnd)) SetPropW(hwnd, (LPCWSTR)MAKEINTATOM(atWindowTheme), hTheme); diff --git a/dlls/uxtheme/tests/system.c b/dlls/uxtheme/tests/system.c index ae4de902730..3f259d08f79 100644 --- a/dlls/uxtheme/tests/system.c +++ b/dlls/uxtheme/tests/system.c @@ -127,7 +127,7 @@ todo_wine ok(hRes == S_OK, "Expected S_OK, got 0x%08x.\n", hRes);
hTheme = OpenThemeData(hWnd, L"Button"); - todo_wine ok(!!hTheme, "OpenThemeData failed.\n"); + ok(!!hTheme, "OpenThemeData failed.\n"); CloseThemeData(hTheme); } else