Commit Graph

1390 Commits

Author SHA1 Message Date
Zhiyi Zhang 3c789e2f10 comctl32/tests: Add an optional message to avoid test failures.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-25 21:19:46 +01:00
Thomas Faber 102d691050 comctl32/tests: Fix DC handle leak.
Signed-off-by: Thomas Faber <thomas.faber@reactos.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-24 11:04:37 +01:00
Thomas Faber 68b48acbc4 comctl32/tests: Test SB_GETPARTS with large wParam.
Signed-off-by: Thomas Faber <thomas.faber@reactos.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-12 22:42:52 +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
Zhiyi Zhang 0f2f195831 comctl32/tests: Fix a treeview test failure when theming is on.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-06 20:29:34 +02:00
Zhiyi Zhang f51a12f969 comctl32/tests: Delete unused headers.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-06 20:29:34 +02:00
Zhiyi Zhang 106a5f43ec comctl32/rebar: Do not remove WS_BORDER when theming is on.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-06 20:29:34 +02: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
Akihiro Sagawa a056663efb comctl32/listbox: Fix redraw after LB_SETCOUNT message.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-12 17:30:21 +02:00
Akihiro Sagawa d3cb9a2961 comctl32/tests: Test pending redraw state with owner-drawn list box.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-12 17:30:21 +02:00
Zhiyi Zhang 8107462b8a comctl32/toolbar: Don't use outside theme handles.
Fix Spy++ Toolbar buttons have artifacts. Spy++ first creates a Toolbar window, then calls
OpenThemeData(hwnd, "Rebar") with the Toolbar window. Then when the Toolbar control uses the theme
handle from GetWindowTheme(), it gets a Rebar theme the next time it draws, thus drawing wrong theme
parts.

According the tests, not all of the common controls have such behaviors. Some of them do have theme
handles opened by their window and then use that theme handle afterwards even it's changed from the
outside. However, for other controls, the behaviors are not very consistent across all Windows
versions. Also no applications depend on such behaviors for other controls yet. So, only modify the
Toolbar control for now.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-22 17:57:46 +02:00
Zhiyi Zhang 677c459b86 comctl32/toolbar: Test that toolbar shouldn't use outside theme handles.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-22 17:57:46 +02:00
Zhiyi Zhang a769679113 comctl32/toolbar: Remove a redundant theme handle check in TOOLBAR_NCCreate().
This is a no-op. In TOOLBAR_NCCreate(), GetWindowTheme() always returns NULL because the theme
handle is not open by OpenThemeData() by that time. Also tests show that TBSTYLE_TRANSPARENT is not
added when theming is active.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-22 17:57:46 +02:00
Zhiyi Zhang e9a5cd2e5a comctl32/tests: Add UDS_SETBUDDY tests.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-22 17:57:46 +02:00
Zhiyi Zhang 2de05267d7 comctl32/theme_dialog: Pass the WM_SYSCOLORCHANGE message to the original dialog procedure.
Even though themed dialog itself doesn't need to repaint after WM_SYSCOLORCHANGE is received,
WM_SYSCOLORCHANGE should be passed to the original dialog procedure DefDlgProcW(), which can then
forward WM_SYSCOLORCHANGE to its common controls and call COMCTL32_RefreshSysColors().

Fix wrong property sheet tab background color after winecfg disables theming.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=44511
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-28 10:25:02 +02:00
Zhiyi Zhang 00e1664b0b comctl32/test: Test that WM_SYSCOLORCHANGE should always be passed to the dialog procedure.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-28 10:25:02 +02:00
Zhiyi Zhang 277daa7ea7 comctl32/theming: Register themed dialog and scrollbar even when theming is not active.
So that we can turn on theming in runtime. Otherwise, themed dialog and scrollbar
are not enabled even if a theme is made active in winecfg if theming is disabled at start.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=44511
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-28 09:40:28 +02:00
Zhiyi Zhang 6576d461b8 comctl32: Repaint after the WM_THEMECHANGED message is received.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-28 09:40:22 +02:00
Zhiyi Zhang a9eaf7a7da comctl32/tests: Test that WM_THEMECHANGED should invalidate client area.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-28 09:40:20 +02:00
Nikolay Sivov b6b98933ec comctl32/tests: Remove unnecessary macro.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-12 19:34:17 +02:00
Nikolay Sivov 0bb8ddfd41 comctl32/tests: Add some tests for ComboEx callback functionality.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-12 19:34:15 +02:00
Nikolay Sivov 302c891eee comctl32/tests: Enable some ComboEx tests on version 6.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-12 19:34:13 +02:00
Nikolay Sivov 043ecca384 comctl32: Fix DPA_GetPtr() prototype.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-09 21:33:43 +01:00
Zhiyi Zhang 3c81ca8381 comctl32/button: Use themed painting when possible for handling WM_SETTEXT.
Fix an issue that themed buttons are drawn unthemed after receiving a
WM_SETTEXT message.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-03 21:54:45 +01:00
Zhiyi Zhang 9dd0c07d7f comctl32/tests: Test themed painting after a WM_SETTEXT message.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-03 21:54:45 +01:00
Gabriel Ivăncescu 4ac05afd39 comctl32: Remove the masked background when 32bpp bitmaps have no alpha values.
Fixes a regression introduced by 61b9209221.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50454
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-06 21:53:17 +01:00
Gabriel Ivăncescu a692a12541 comctl32/tests: Add more tests for 32bpp bitmaps with and without alpha, and masks.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-06 21:53:14 +01:00
Nikolay Sivov c11fca37de comctl32/tests: Fix loop bounds.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-09 16:21:33 +02:00
Nikolay Sivov 573b3eb432 comctl32/ipaddress: Fix IPM_CLEARADDRESS return value.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-09 16:21:33 +02:00
Hirofumi Katayama 3c29108523 comctl32/ipaddress: Focus first field on WM_SETFOCUS.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49924
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-08 21:46:43 +02:00
Nikolay Sivov 6cfc5df3f5 comctl32/ipaddress: Fix IPM_SETFOCUS return value.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-08 21:46:43 +02:00
Nikolay Sivov 6f8957156e comctl32/ipaddress: Select field contents on IPM_SETFOCUS.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-08 21:46:43 +02:00
Nikolay Sivov 81727e1953 comctl32/tests: Remove skips from DPA tests.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-06 11:57:00 +02:00
Nikolay Sivov 120364fa9c comctl32/tests: Remove some workarounds from ListView tests.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-05 20:51:42 +02:00
Nikolay Sivov 4c86e860e6 comctl32/tests: Use wide strings literals.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-25 10:48:48 +02:00
Nikolay Sivov 9a5c9be164 comctl32/datetime: Do not call default procedure for WM_NCCREATE.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-25 10:48:45 +02:00
Jactry Zeng fd53a4b8e3 comctl32: Implement WM_GETTEXTLENGTH for datetime picker.
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-24 15:41:08 +02:00
Eric Wheeler 578aae071b comctl32/listview: Add Get/SetSelectedColumn() support.
Selected column should be using different background color,
this patch does not implement this.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-07 21:07:52 +02:00
Nikolay Sivov c32720349c comctl32/listview: Do no alter custom draw text colors between notification stages.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-21 15:18:06 +02:00
Piotr Caban 1bd27e50d2 comctl32: Fix non printable characters handling in SB_SETTEXT.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-21 15:17:19 +02:00
Piotr Caban 378548581d comctl32: Offset client area when toolbar divider is present.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-17 23:16:52 +02:00
Piotr Caban 659b0d7017 comctl32: Compute border size from client and window rectangles.
Fixes toolbar size when WS_EX_DLGMODALFRAME is used.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-17 23:16:52 +02:00
Nikolay Sivov ab81945d65 comctl32/listview: Use case-insensitive compare in LVM_FINDITEM.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-17 00:04:13 +02:00
Zhiyi Zhang 463482a829 comctl32/button: Do not set BS_PUSHBUTTON and BS_DEFPUSHBUTTON style directly to Split Buttons and Command Links.
For Split Buttons and Command Links of common control version 6, setting
BS_PUSHBUTTON and BS_DEFPUSHBUTTON style toggles their default bit.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47621
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-06 19:01:39 +02:00
Zhiyi Zhang 01fbe20617 comctl32/tests: Test button styles.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-06 19:01:37 +02:00
Ziqing Hui 47a5cd1090 comctl32/tests: Fix ImageList_DrawIndirect() test failures on winxp.
GetDeviceCaps(BITSPIXEL) is always 32 in our test cases. So we can ignore it.

Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-20 17:19:11 +02:00
Roman Pišl be1446f56c comctl32/edit: Avoid division by zero in EDIT_EM_LineScroll_internal.
Signed-off-by: Roman Pišl <rpisl@seznam.cz>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-20 17:19:11 +02:00
Roman Pišl 571489fde1 comctl32/edit: Avoid division by zero during initialization.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48803
Signed-off-by: Roman Pišl <rpisl@seznam.cz>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-20 17:19:11 +02:00
Ziqing Hui 59987bc9ec comctl32/tests: Remove duplicate ImageList_DrawIndirect() tests.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-17 21:06:48 +02:00