Commit Graph

8 Commits

Author SHA1 Message Date
Zhiyi Zhang 25daa0fa06 uxtheme: Use tab background as dialog texture for more WM_CTLCOLOR* messages.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-09 18:37:32 +01:00
Zhiyi Zhang b02405d799 uxtheme: Hook DefDlgProc() for dialog theming.
Fix controls on OpenMPT's channel setting dialog having incorrect background.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-24 10:18:31 +01:00
Zhiyi Zhang 9c9274990e uxtheme: Do not hook DefDlgProc() for theming.
Currently there is no need to hook DefDlgProc(). Tests show that dialog theming shouldn't be
implemented in DefDlgProc().

Also fix a double free bug because WM_DESTROY in UXTHEME_DefDlgProc() calls CloseThemeData() even
when the theme handle is not opened when handling WM_CREATE in UXTHEME_DefDlgProc(). The bug can
be demonstrated by running comctl32/tests/propsheet.c tests with Light theme.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-07 12:22:49 +01:00
Zhiyi Zhang 7c5a62b4c5 comctl32/propsheet: Handle WM_ERASEBKGND in the property sheet page window procedure.
Handle WM_ERASEBKGND in the property sheet page window procedure and use a pattern brush created
from theme parts to fill background instead of calling DrawThemeBackground() directly.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-07 12:22:37 +01:00
Zhiyi Zhang b1ccad4b5c comctl32/propsheet: Handle WM_CTLCOLORSTATIC in the property sheet page window procedure.
Move themed WM_CTLCOLORSTATIC handling from UXTHEME_DefDlgProc() to the property sheet page window
procedure.

Fix a regression from 2f1bbd8 that makes the static controls in file open dialog to have black
background when using some themes.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51987
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-07 12:22:30 +01:00
Zhiyi Zhang 5cdbcb0f59 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: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-01 18:13:54 +01:00
Zhiyi Zhang 2f1bbd88ed uxtheme: Do not draw parent background when handling WM_CTLCOLORSTATIC for static controls.
SetBkMode(TRANSPARENT) already indicates that the parent background should remain untouched.
Drawing parent background destroys any previous content that applications drawn and some
applications rely on the content being unchanged.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51914
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-04 10:25:07 +01:00
Zhiyi Zhang b0e51ead0d uxtheme: Move themed dialog to uxtheme.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51137
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-20 18:49:55 +02:00