Commit Graph

4743 Commits

Author SHA1 Message Date
Francois Gouget 3a3f406028 comctl32/tests: Use winetest_push_context() in tooltip:test_customdraw().
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-16 20:46:49 +02:00
Angelo Haller 1132f5f74b comctl32/tests: Add change sequence for ownerdata listviews.
Add a new test sequence for ownerdata listviews that logs solely
item change notifications for single and multiple items changing.
Use it in the ownerdata multiselect tests.

Signed-off-by: Angelo Haller <angelo@szanni.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-05 20:56:34 +02:00
Angelo Haller ca9e3586de comctl32/tests: Add multi select tests for ownerdata listviews.
Add tests for selecting multiple items in ownerdata listviews by
using SHIFT/CTRL and arrow keys.

Signed-off-by: Angelo Haller <angelo@szanni.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-05 20:56:24 +02:00
Angelo Haller 2d78448464 comctl32/tests: Add hold_key and release_key functions.
Add functions to simulate the holding of keys like SHIFT, CTRL,...

Move existing SHIFT key press emulation to these functions.

Signed-off-by: Angelo Haller <angelo@szanni.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-05 20:56:13 +02:00
Drew Ronneberg 07417f8bf1 comctl32: Remove obsolete -D_COMCTL32_ from Makefile.in.
Signed-off-by: Drew Ronneberg <drew_ronneberg@yahoo.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-28 12:17:32 +02:00
Francois Gouget b6b0bc7c9f comctl32/tests: Use winetest_push_context() in test_combo_dropdown_size().
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-27 17:23:36 +02:00
Zebediah Figura 5e4dedff8e win32u: Remove the "proc" parameter to NtUserSetSystemTimer().
Testing on 32-bit Windows 10 suggests that the function only has three
parameters. The test fixed in this patch (which still succeeds on e.g. Windows
2003) suggests that the final parameter to SetSystemTimer() is not a callback,
either.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-21 14:41:22 +02:00
Rafał Harabień cfe5184b26 comctl32/tests: Remove now unused TODO_COUNT in static control tests.
Signed-off-by: Rafał Harabień <rafalh92@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-07 22:44:40 +02:00
Rafał Harabień c1c6b4bcf2 comctl32/tests: Fix invalidation in static control tests.
Rectangle used for invalidation was outside of windows rect of static
controls with SS_ETCHEDHORZ/SS_ETCHEDVERT style because they resize
after creation. Improve test by changing the invalidated rect and
add more details in comment about SS_ETCHEDHORZ/SS_ETCHEDVERT styles.

Signed-off-by: Rafał Harabień <rafalh92@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-07 22:44:40 +02:00
Rafał Harabień 176bd922df comctl32: Send WM_CTLCOLORSTATIC for all static control types.
Signed-off-by: Rafał Harabień <rafalh92@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-07 22:44:39 +02:00
Rafał Harabień 4e8277e633 comctl32: Fix handling of SS_ETCHEDHORZ/SS_ETCHEDVERT static control styles.
Instead of drawing the frame in WM_PAINT use WS_EX_STATICEDGE style that
adds the frame outside of the client rect and change control size after
creation to make it look like a line.

Signed-off-by: Rafał Harabień <rafalh92@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-07 22:44:39 +02:00
Rafał Harabień 010eb02dc2 comctl32/tests: Add more static control tests.
Signed-off-by: Rafał Harabień <rafalh92@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-07 22:44:39 +02:00
Zhiyi Zhang 24785b4096 comctl32/tests: Use correct width and height in create_bitmap() helper.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-22 18:39:37 +01:00
Jinoh Kang 62df608d3e comctl32: Pre-multiply static control bitmap image by alpha for GdiAlphaBlend.
Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-16 22:34:30 +01:00
Zhiyi Zhang 7de22a7438 comctl32/tests: Fix a possible test failure.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52639
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-10 18:27:43 +01:00
Zhiyi Zhang 7f54c4c014 comctl32/tests: Fix a test failure when theming is active.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-01 10:35:07 +01:00
Eric Pouech f2b4634c18 comctl32/tests: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-28 21:30:19 +01:00
Eric Pouech 2596bd57c6 comctl32/tests: Use inline function in expect*() macros to handle integral conversion.
depending on the files, these macros can be called with:
- UINT/UINT, DWORD/DWORD pairs, but also UINT/DWORD or DWORD/UINT pairs...
- wrapping inside an inline function allows the compiler to take care of
  the integral conversions

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-24 20:22:21 +01:00
Eric Pouech 330261b9b4 comctl32/tests: Use correct integral type.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-24 18:47:02 +01:00
Nikolay Sivov 4f1853c576 comctl32/listview: Initialize subitem text buffer before drawing each subitem.
Notification handler for LVN_GETDISPINFO is not guaranteed to touch text buffer.
When it doesn't, it can lead to already queried text to be reused for subitems.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52583
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-23 17:31:41 +01:00
Dmitry Timoshkov f1a3586f10 comctl32/listview: Fix changed notification mask for inserted items.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-22 18:20:23 +01:00
Dmitry Timoshkov 3cd366eee6 comctl32/listview: Send change notifications when inserting (LVIS_SELECTED|LVIS_FOCUSED) items.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-22 18:20:23 +01:00
Eric Pouech 06d399fcb0 comctl32/tests: Don't outdent todo_wine*.
This prevents -Wmisleading-indentation warnings (Mingw GCC11).

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-21 18:55:22 +01:00
Dmitry Timoshkov 915ff82904 comctl32/tests: Add more LVM_INSERTITEM tests.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-21 12:32:06 +01:00
Dmitry Timoshkov 8961e7220b comctl32/tests: Add iItem and uChanged to LVN_ITEMCHANGING/LVN_ITEMCHANGED context.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-21 12:32:06 +01:00
Dmitry Timoshkov a99c1ee764 comctl32/tests: Print id value as decimal.
All the notification codes (printed as an id) have negative base value
(SBN_, UDN_, HDN_, BCN_, TBN_, TTN_, RBN_, TRBN_, PGN_, TVN_, LVN_, TCN_,
CBEN_, IPN_, MCN_, DTN_), and printing them as decimal helps to quickly
identify the corresponding notification value in cases when an id in
the message sequence doesn't match. Custom ids in the message sequences
have small numbers (0, 1, 2, ...), so they also get printed correctly.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-21 12:32:06 +01:00
Alex Henrie 259557cdce comctl32/tests: Drop mru test workarounds for Windows <= 2000.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-17 22:16:03 +01:00
Zhiyi Zhang 0cbfa9be51 comctl32/button: Use pressed state when a pushlike checkbox or radio button is checked and hovered.
On XP, when a pushlike checkbox or radio button is checked and hovered,
PBS_HOT is used. In later versions of Windows, PBS_PRESSED is used. This
patch changes pushlike checkboxes and radio buttons to use the new
behavior because it seems more intuitive.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52436
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-10 10:44:10 +01:00
Zhiyi Zhang 8ce869f40b comctl32/treeview: Do not draw client edge without WS_EX_CLIENTEDGE.
Fix foobar2000 having an extra edge around tree view non-client size box.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-10 10:44:10 +01:00
Zhiyi Zhang 19a77a8b6a uxtheme: Use COLOR_BTNFACE to fill scroll bar background.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-10 10:44:10 +01:00
Zhiyi Zhang e7011c9d65 comctl32/tab: Always draw parent background when themed.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-10 10:44:10 +01:00
Zhiyi Zhang b13c4127a9 comctl32/tests: Fix occasional test failures on TestBot w7u_2qxl.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-10 10:44:10 +01:00
Zhiyi Zhang cb3b982148 comctl32/button: Use the brush from WM_CTLCOLORSTATIC to fill text background for group boxes.
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 c69d3bb781 comctl32/button: Use the brush from WM_CTLCOLORSTATIC to fill background for checkboxes and radio buttons.
Fix radio buttons of Mupen64-RR-Lua input window having stale background. Mupen64-RR-Lua doesn't actually handle
WM_ERASEBKGND even though it returns nonzero. And tests show that a WM_CTLCOLORSTATIC is sent and the returned brush
is used for filling background, even painting over the content from DrawThemeParentBackground().

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52433
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 509d6a1d5f comctl32/button: Use the brush from WM_CTLCOLORBTN to fill background for push buttons.
The brush from WM_CTLCOLORBTN is used for filling background for push buttons after a DrawThemeParentBackground() call
according to tests.

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 179117a689 comctl32/trackbar: Always use brush from WM_CTLCOLORSTATIC to fill background.
Fix the track bar of Mupen64-RR-Lua input window having black background. Mupen64-RR-Lua doesn't actually handle
WM_ERASEBKGND even though it returns nonzero. And tests show that only WM_CTLCOLORSTATIC is sent when drawing themed
trackbar background.

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 5c901a04b3 comctl32/tests: Add themed background tests.
Add themed background tests to determine whether DrawThemeParentBackground()
or WM_CTLCOLOR* are used to draw themed background for comctl32 classes.

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 e82d96ed5e comctl32/treeview: Use DFCS_MONO style for item check boxes.
Keep it consistent with Windows.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-07 11:01:19 +01:00
Zhiyi Zhang 35ed21d27a comctl32/treeview: Support HiDPI for unthemed item check boxes.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-07 11:01:14 +01:00
Nikolay Sivov 8806159bcd comctl32: Fix long types warnings in traces.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-07 10:58:51 +01:00
Alexandre Julliard f0cd33c69e include: Add support for defining Win32 types as 'long' where possible.
Add -DWINE_NO_LONG_TYPES to modules that still have compilation
warnings with long types.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-27 20:38:22 +01:00
Nikolay Sivov 0bc91a72e8 comctl32/tests: Add some tests for TBBUTTON.iBitmap for separators.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52465
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-27 17:58:37 +01:00
Eric Pouech 5e56ada9c4 comctl32: Use correct integral type.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-27 11:12:55 +01:00
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 d1c0990344 comctl32/propsheet: Handle page dialog tab texture in DefDlgProc().
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-24 10:18:42 +01:00
Zhiyi Zhang 9083b1e8b1 comctl32/static: Enable parent dialog tab texture.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-24 10:18:39 +01:00
Zhiyi Zhang c5ba5e2ecb comctl32/button: Enable parent dialog tab texture.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-24 10:18:35 +01:00
Nikolay Sivov c16b65cdd9 comctl32/listview: Add partial implementation of LVM_GETNEXTITEMINDEX.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-21 18:40:30 +01:00
Zhiyi Zhang 1e8ce36e30 comctl32/tests: Remove WM_CTLCOLORSTATIC tests for property sheets.
The removed tests are covered by test_EnableThemeDialogTexture() in uxtheme/tests/system.c.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-21 09:24:49 +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