Skip to content
Snippets Groups Projects
Commit 5cdbcb0f authored by Zhiyi Zhang's avatar Zhiyi Zhang Committed by Alexandre Julliard
Browse files

uxtheme: Call DefDlgProc() if drawing tab body in a dialog fails.


Some third party themes have tab body part defined but with its ImageSelectType set to IST_NONE.
In this case, DrawThemeBackground() will fail to draw the background.

Fix track bar black background in winecfg when using VLT theme.

Signed-off-by: default avatarZhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard's avatarAlexandre Julliard <julliard@winehq.org>
parent bcbe1bcf
No related branches found
No related tags found
No related merge requests found
......@@ -38,8 +38,9 @@ LRESULT WINAPI UXTHEME_DefDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPa
static const WCHAR themeClass[] = L"Window";
BOOL themingActive = IsThemeDialogTextureEnabled (hWnd);
BOOL doTheming = themingActive && (theme != NULL);
HRESULT hr = E_FAIL;
LRESULT result;
switch (msg)
{
case WM_CREATE:
......@@ -78,13 +79,11 @@ LRESULT WINAPI UXTHEME_DefDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPa
NULL);
#endif
return user_api.pDefDlgProc(hWnd, msg, wParam, lParam, unicode);
else
/* We might have gotten a TAB theme class, so check if we can
* draw as a tab page. */
if (IsThemePartDefined (theme, TABP_BODY, 0))
DrawThemeBackground (theme, (HDC)wParam, TABP_BODY, 0, &rc,
NULL);
else
/* We might have gotten a TAB theme class, so check if we can draw as a tab page */
else if (IsThemePartDefined(theme, TABP_BODY, 0))
hr = DrawThemeBackground(theme, (HDC)wParam, TABP_BODY, 0, &rc, NULL);
if (FAILED(hr))
return user_api.pDefDlgProc(hWnd, msg, wParam, lParam, unicode);
}
return 1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment