Commit Graph

13 Commits

Author SHA1 Message Date
Fabian Maurer 8fae32885a comctl32/tests: Avoid "misleading indentation" warnings.
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-26 21:53:13 +01:00
Zhiyi Zhang 2390371f0f comctl32/tests: Remove WM_CTLCOLORSTATIC tests for static controls.
These tests are covered by test_EnableThemeDialogTexture() in uxtheme/tests/system.c. These tests
are also misleading because a WM_ERASEBKGND message is needed to actually activate dialog theming.
Without the message, they give the impression that EnableThemeDialogTexture() does nothing and
DefDlgProcA/W() are not hooked.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-21 09:24:44 +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 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 fa1294faa6 comctl32/tests: Add more WM_CTLCOLORSTATIC tests for static controls in a dialog.
Mostly to test that even when theme texture is enabled for a dialog, the default dialog procedure
still returns the stock COLOR_BTNFACE brush in response to WM_CTLCOLORSTATIC.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-07 12:22:03 +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 e17aedb284 comctl32/tests: Test WM_CTLCOLORSTATIC for static controls in a themed dialog.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-04 10:25:05 +01:00
Dmitry Timoshkov 9b7faf98a9 comctl32: Check control type in the STM_SETIMAGE/STM_SETICON handlers before calling the helpers.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-18 20:08:42 +02:00
Dmitry Timoshkov 2c4f5c0eab comctl32/tests: Add more tests for Static/SS_BITMAP control.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-11 08:56:37 +01:00
Dmitry Timoshkov e2f179d84f comctl32: Create an internal copy for 32-bpp bitmaps with an alpha channel for Static control.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47018
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-11 08:56:37 +01:00
Dmitry Timoshkov f909d18baf comctl32/tests: Add some tests for Static/SS_BITMAP control.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-07 21:30:43 +01:00
Nikolay Sivov 69d9052206 comctl32/tests: Use existing macros for control class names.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-14 09:04:47 +01:00
Nikolay Sivov c170a48323 comctl32/tests: Add Static control tests.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-14 10:54:04 +01:00